Page 1 of 1

You can write anything in Perl, apparently

Posted: Sat Mar 09, 2013 9:16 pm
by Fairportfan

Code: Select all

my ($question, $to_be, $asleep); # version 0.1
 my $author = "Colin McMillen";
 my $apologies_to = "William Shakespeare";
 my $to_be = 1;

while ($to_be || (!$to_be)) {
 $question = "that";
 if (suffer($slings && $arrows_of_outrageous_fortune)
 or
 (take_arms_against($sea_of_troubles) && by_opposing() eq "end +them")) {
 do {
 $to_be = 0;
 $asleep = "no more";
 die "We end the heart-ache, and the thousand".
 " natural shocks that flesh is heir to";
 } while ("'tis a consumation devoutly to be wish'd.");
 }
 }
 sub suffer {
 return true;
 }
 sub take_arms_against {
 return true;
 }
 sub by_opposing {
 return "end them";
 }
From here.

Re: You can write anything in C, apparently

Posted: Sat Mar 09, 2013 11:34 pm
by Dave
'cept that isn't written in C at all. It's written in Perl, the "Swiss Army chainsaw" of scripting languages. If it can be programmed, it can probably be written in Perl... in at least 15 different coding styles and metaphors. Perl is nothing if not flexible.

Re: You can write anything in C, apparently

Posted: Sun Mar 10, 2013 9:05 am
by Fairportfan
Dave wrote:'cept that isn't written in C at all. It's written in Perl, the "Swiss Army chainsaw" of scripting languages. If it can be programmed, it can probably be written in Perl... in at least 15 different coding styles and metaphors. Perl is nothing if not flexible.
Arrrgh. And i even knew that! (I don't do C)