in reply to User-Defined Sub, Passing a Single Argument?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: User-Defined Sub, Passing a Single Argument?
by kennethk (Abbot) on Oct 15, 2014 at 17:37 UTC |