sub some_function { # do stuff with $_ } my ($word1, $word2) = split /\s+/,<>; &some_function; # $_ is the first line &some_function while (<>); # $_ cycles through rest of file
...and if you dislike egregiously abusing $_, you can throw in explicit variables in some_function.
In reply to Re: "uhshifting" the diamond?
by delirium
in thread "uhshifting" the diamond?
by glwtta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |