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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Regexps and T-SQL (Score:1)
Regexps are usually very compact and opaque. Your comment about whitespace is spot on, so
Re: $_ (Score:1)
I think the exact opposite.
$_has a meaning in Perl: “the current ‘thing’ being operated on”. That's a well-defined convention, and it has the advantage of being the same in every program.In other languages when people want a temporary variable they often use
iornors, but they aren'Re: $_ (Score:1)
If the code block is very brief, like inthen I agree that it isn't necessary to alias it to a new name. But if the code block is longer than a few lines, it's indeed very useful to have an actual name connected to the entity you're dealing with.
Consider the following piece of code:Note how the my $oReply line doesn't stand alone since you have to backtrack to the loop to find out what $_ is.
Reply to This
Parent