you pull them off the @_ array you can shift them off the array individually or assign them in one shot as shown above. <edit> alternatively, if you have only one parameter you can do the following my $param_one = shift @_</edit>foo("test","test2"); sub foo { my ($param_one,$param_two) = @_; print $param_one . "-".$param_two."\n"; }
In reply to Re: passing variables between subroutines
by Grygonos
in thread passing variables between subroutines
by budreaux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |