On Fri, Apr 29, 2011 at 05:55:18PM -0400, Uri Guttman wrote:
> >>>>> "MM" == Mike McClain <mike.j...@cox.net> writes:
<snip> 
>   zs> my $expr = $_[0];
>   >> 
>   >> this is better:
>   >> my ( $expr ) = @_ ;
> 
>   MM> Better how?
> 
> * it doesn't require indexing so it is faster.
> * it is the most standard way to get sub args.
> * it easily allows for adding args by just putting another var
>   in the ().
> * you can assign the rest of the args to an array or hash (after the
>   scalar args).
> 
> ***** oh, it is also 1 char (not counting white space) shorter!
> 
> at least 4+ good reasons there! and not one downside reason i can think
> of.
> 
> and those are also good reasons not to use shift on @_ except when it
> really is needed.
> uri

Those look like good reasons to me.
Thanks,
Mike
-- 
Satisfied user of Linux since 1997.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to