Acme-LSD
view release on metacpan or search on metacpan
lib/Acme/LSD.pm view on Meta::CPAN
our $VERSION = "0.04";
use base qw<Tie::Handle>;
use Symbol qw<geniosym>;
my $TRUE_STDOUT;
sub TIEHANDLE { return bless geniosym, __PACKAGE__ }
sub PRINT {
shift;
local $\ = undef;
foreach my $str (@_) {
my $copy = $str;
$copy =~ s/[^\w']/ /g; # convert all non-words into spaces
$copy =~ s/ +/ /g; # convert all multiple spaces into single space
$copy =~ tr/A-Z/a-z/; # convert all words to lowercase
foreach my $char (split(//, $copy)) {
my $r = int(rand(6)) + 31;
my $s = int(rand(8));
print $TRUE_STDOUT "\033[" . "$s;$r" . "m$char\033[0m";
( run in 3.340 seconds using v1.01-cache-2.11-cpan-d80b1682f3f )