&foo;
will call your subroutine with the @_ array set to the arguments of the caller.
an example
the call to bar will now printbar("a","b"); sub bar { foo(); &foo(); &foo; } sub foo { ($a, $b)=@_; print "$a, $b\n"; }
, , a, b
In reply to Re: Re: Re: subroutine call
by dga
in thread differences between ways of calling subroutines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |