Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

mdxi (4658)

mdxi
  (email not shown publicly)
http://mdxi.collapsar.net/

Journal of mdxi (4658)

Monday February 09, 2004
12:30 AM

Tight

[ #17295 ]

00:07 <mdxi> you know why i love perl? because i can say things like: "if (defined $today{$cgi->param('vote')})" and "foreach (@{$order{$cat[$m]}})"
00:09 <TMR> If I could pronounce it, I could say that too.
00:11 <mdxi> the first one is pronounced "if the hash 'today' has an extant key with the name of the return value of the method call param('vote') on the object $cgi"
00:14 <mdxi> the second one is trickier
00:17 <mdxi> it's pronounced "take the array reference which is the value attached to the key in the hash %order whose name matches the value of the $mth member of the array $cat, treat it (the arrayref) as an array instead of the scalar that it actually is, and feed the contents of its referrent array, one by one, into the special variable named $_"

If you ever want to realize just how consise Perl is, just port it to English.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.