[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: [ID 20000111.008] use strict 'vars'
london@pixelmagic.com writes:
: I'm sure there is a really good reason that user defined sort subs
: use the global/local/univeral/magical variables $a and $b to determine
: sorting order, rather than having the sort routine look at a less painful
: variable, such at @_. faster, less memory, something.
Speed and notational convenience.
In a very recent development version of Perl, if you use a sort sub
with a ($$) prototype, it'll give you the arguments in @_. Eventually
you'll be able to use a prototype of ($a, $b) and get them back into
$a and $b, only as lexicals.
Larry
- References to:
-
london@pixelmagic.com
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]