Re: About variables passed to sub routines

2013-09-24 Thread Andy Bach
On Tue, Sep 24, 2013 at 8:23 AM, Harry Putnam wrote: > The way in use in script below works... quotations around "@_", so the > content is passed rather than the element count. And the ways that > are commented out also work. > Yeah, that's a bit of a fragile idiom - inside dbl quotes, arrays a

Re: About variables passed to sub routines

2013-09-24 Thread Nathan Hilterbrand
See below, please. On 09/24/2013 09:23 AM, Harry Putnam wrote: Somehow I had it my mind that perl would recognize an incoming variable to a sub routine like: sub test($var) As $_ if there was only one element to @_, But I see from testing that, no, not true. These three methods below a

About variables passed to sub routines

2013-09-24 Thread Harry Putnam
Somehow I had it my mind that perl would recognize an incoming variable to a sub routine like: sub test($var) As $_ if there was only one element to @_, But I see from testing that, no, not true. These three methods below all work. Perhaps there are others. if ( -f "@_" ) (my $fname) =