No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
pfaut gave you a good answer, though there are still a couple of thing about your post worth commenting one.
First, you showed code (good), but you didn't actually show how the code was being invoked. In this particular case, the actual invocation wasn't relevant, though it often is. Posting a small, complete fragment increases the odds of getting problems solved. Last, you can save space (and reader comprehension), by writing idiomatic Perl, like this: instead of The former form maps arguments to lexical variables right away, which is friendly to your readers. Making people read further into your subroutine to find arguments increases the likelihood that people will misunderstand what you're doing.
In reply to Re: shift vs. @_ (where @_ evaluates to 1)
by dws
|
|