If you need to pass more than one argument, try this:do_work ($cmd); sub do_work { my $command = shift; # do stuff here... }
HTHdo_work ($cmd, $foo); sub do_work { my ($command, $foo) = @_; # do stuff }
In reply to Re: Strict and Subroutines
by vek
in thread Strict and Subroutines
by Pearte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |