[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] $silly == $fun



#!/usr/local/bin/perl
# is this a Perl-O-Gram?

my $english =
 "Probably not as good as it should be, and perhaps slightly tainted ".
 "with perl... (Sorry! :)";

my $notion;
my $example;

$notion->{'Fun'} = <<'EON';

 Solve an ordinary and simple problem by using some twisted, crazy,
 silly or obfuscating programming techniques in a way that makes one
 look in awe, ponder, smile and think "this guy is a friggin' loonie!". :)

EON

$example->{'aLittleFun'} = <<'EOF';
#!/usr/local/bin/perl -wT
#
# Based on <199906250252.WAA17576@astro.fccj.cc.fl.us> by Chaim Frenkel
# and <19990620191315.31968.qmail@plover.com> by Mark-Jason Dominus
#
# (Where do you people get this stuff?!? :)

use strict;

print "10 bottles o'beer on the wall,\n".
      "10 bottles o'beeer!\n".
      "Take one down - pass it a-round,\n".
      "9 bottles o'beer on the wall!\n\n";

undef $/;
seek(DATA,0,0);
$_ = <DATA>;

my $foo = 9;
my $bar = $foo--;
s{ 9 }{ $foo }xegs;
s{ 10 }{ $bar ? $bar : exit }xegs;

s/\<DATA/\<STDIN/g;

close STDIN;
pipe(STDIN, OUT);
print OUT;
close OUT;

eval;

__DATA__
EOF

print $example->{'aLittleFun'};

__END__


- Salve J. Nilsen

-- 
#!/usr/local/bin/perl
$_ = 'Sometimes I have dreams, dreams where I wish my email address was
                        president@whitehouse.gov
but, alas - it is only...'; s/.*?ent/sjn/s; s/whi.*/pvv.org\n/s; print;
                                                       "The McQuary Limit sucks!"








==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe