[JOB] Perl Software Developer and Database programmer

Andy Armstrong andy at hexten.net
Wed Feb 22 23:39:58 GMT 2006

On 22 Feb 2006, at 23:28, Tim Sweetman wrote:
> If you have to do something like this:
> local $_ = 'house'; # tell the wolf what to blow down
> Bad::Wolf::BlowDown("very forcefully");
> ... then that's passing parameters via $_, and is obviously a  
> ghastly hack and silly, and should cause maintenance programmers to  
> shout, a lot, and rudely.

Sure, it's ghastly - but that's Perl's fault :)

If you want to write a sub that behaves like map or grep you have to  
pass an argument in $_ and you have to localise it - either  
implicitly as in for (@blah) { } or explicitly.

Andy Armstrong, hexten.net

More information about the london.pm mailing list