Method 2 should have parens: my ($arg) = @_;
As for which style to use, it really doesn't matter, it is all a matter of personal taste and I have used all three (though typically one of the first two).
Update: Better phrasing, thanks kennethk
Good Day,
Dean
In reply to Re: User-Defined Sub, Passing a Single Argument?
by duelafn
in thread User-Defined Sub, Passing a Single Argument?
by mmartin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |