in reply to Strict and Subroutines
Begin by reading perlsub.
The use of local for routine parameter passing is not a good idea; you should be using my instead:
While there are circumstances where local is needed, this is not one of them. There are other excellent writeups on this topic in the Tutorials section.sub do_work { my ($cmd) = @_; # whatever... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Strict and Subroutines
by Pearte (Beadle) on Jul 30, 2002 at 16:26 UTC |