>>>>> "rw" == robert wilson <[EMAIL PROTECTED]> writes:
rw> On Sunday 09 December 2007, Michael G Schwern (Michael G Schwern
rw> <[EMAIL PROTECTED]>) wrote:
>> sub new [EMAIL PROTECTED],shift}
>>
>> Was my first shot at 23. Then I figured I could knock off that range op...
rw> my first shot was 23 also...
rw> sub new{($a,@b)[EMAIL PROTECTED];[EMAIL PROTECTED],$a}
rw> then i came up with this 21 a few seconds later:
rw> sub [EMAIL PROTECTED],1},pop}
rw> i think that's the best i can do... i'll be very impressed if anyone does
rw> better than 21.
you and marcus are tied for first with the same answer.
is there any guarantee of evaluation order in arg lists? will the
bless/splice always be executed before the pop?
my longer but amusing answer is this:
sub new {
[EMAIL PROTECTED]
}
it is not warning safe and it leaves '' => CLASS in the hash. but it has
no temp vars, calls to splice or shift.
uri
--
Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org