in reply to You know you've been programming in Perl too long when...
#!/usr/bin/perl -w use strict; my @life = qw 'birth starting middle ending death'; foreach my $part (@life){ if($part ne 'death'){ print "Have fun, Code perl!\n"; } else{ die "There's nothing left to code...\n"; } }
--xPhase
PS - Obfu or even more compact code would work as well, but I went for pure readability.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: You know you've been programming in Perl too long when...
by scain (Curate) on Aug 01, 2001 at 22:13 UTC |