while (<HANDLE>) { ... } # same as ... while (defined($_ = <HANDLE>)) { ... }
foreach (@list) { ... } # same as foreach $_ (@list) { ... }
$count = grep { BLOCK } LIST; @result = grep { BLOCK } LIST; @result = map { BLOCK } LIST; map { BLOCK } LIST; # invalidates your warranty
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re^5: looking for a good idiom: return this if this is true
by merlyn
in thread looking for a good idiom: return this if this is true
by merlyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |