in reply to Can I tell a sub to take $_ instead of @_ (like some builtins do)
A slight variation
#! perl -w sub test { my $parm = $_[0] || $_; print $parm, $/; } test( "fred"); test for qw(the quick brown fox); __END__ # Output C:\test>192129 fred the quick brown fox C:\test>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re x 2: Can I tell a sub to take $_ instead of @_ (like some builtins do)
by Sweeper (Pilgrim) on Aug 23, 2002 at 05:44 UTC | |
by BrowserUk (Patriarch) on Aug 23, 2002 at 05:58 UTC |