I'm aware that translating Metallica to Perl is a tried and tested subject here at the monastery. But with all its Perly bits, I couldn't resist translating perhaps their best-known song, Enter Sandman, into Perl.
say(y/our $prayers/$little[1]/);
do { not 'for(get(my $son), 2, q#include "everyone"#)' };
$i->tuck($you, 'in', 'warm within') until ($the{sandman}->comes);
sleep('with'), 1 x open(EYE);
gripping(y/our $pillow/tight/);
exit $LIGHT;
enter($NIGHT);
take (my $hand);
$we = 'off to never never land';
$something = 'wrong', shut($the{$LIGHT});
Heavy::Thoughts->tonight and $they = not $of{snow_white};
$dreams{war}, $dreams{liars}, $dreams{@dragons[$fire]}
and $of{things_that_will_bite};
sleep('with'), 1 x open(EYE);
gripping(y/our $pillow/tight/);
exit $LIGHT;
enter($NIGHT);
take (my $hand);
$we = 'off to never never land';
now("$i lay $me down", 2, sleep);
$i->pray($the{lord}, my $soul, \&keep);
if ($i, die, "before $i wake") {
$i->pray($the{lord}, my $soul, \&take);
}
hush($little[$baby]), do { not say(/a \w/) }
and 'never mind that noise you heard';
$it = 'just' . $the{beast} . 'under' . y/our $bed//
. 'in' . y/our $closet// . 'in' . y/our $head//;
exit $LIGHT;
enter($NIGHT);
grain($of{sand});
exit $LIGHT;
enter($NIGHT);
take (my $hand);
$we = 'off to never never land';
It compiles, too, but soon dies with an undefined subroutine error. Shame really, I was hoping it would send my Windows box into eternal sleep. ;) Interestingly, reading Damian's Exegesis 4 reveals that but will be a keyword in perl6. This could make for an interesting rewrite of Sad But True... /me hides from Metallica's lawyers getting this node reaped
And as this is my 100th post to the Monastery, I'd like to take this oppurtunity to thank all the monks who have helped me in my never-ending search for Perl wisdom. You're all camels in the desert of my ignorance, on the search for the oasis of knowledge. Um, actually that choice of words may be ill-advised...
--
amoe