in reply to Re: Why does my subroutine not receive the scalar parameter as $_?
in thread Why does my subroutine not receive the scalar parameter as $_?

Actually this is one of the best Q&'A's I've seen. If you think about it, even as an experienced perl person, it's a good question. One could quite reasonably expect this behavior. And of course the answer is...
local $_ = shift || $_;
Which I found myself using a bit recently.

--
perl -pew "s/\b;([mnst])/'$1/g"

  • Comment on Re: Answer: Why does my subroutine not receive the scalar parameter as $_?
  • Download Code