The stupid question is the question not asked | |
PerlMonks |
User-Defined Sub, Passing a Single Argument?by mmartin (Monk) |
on Oct 15, 2014 at 17:27 UTC ( [id://1103938]=perlquestion: print w/replies, xml ) | Need Help?? |
mmartin has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks, I was in the middle of writing a sub/function in my script and I was curious about the following circumstance, and was wondering if one of the methods below is preferred or recommended over the other. The situation is when you pass ONLY a single argument to a sub-routine. So there will only ever be one argument passed to my sub/function... Is one of these methods preferred/recommended over the other: METHOD #1
METHOD #2
METHOD #3
I'm not sure if there are other ways to grab the argument besides those, but are any of those the preferred/recommended method over the other? Thanks in Advance, Matt
Back to
Seekers of Perl Wisdom
|
|