Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Comparison result capture???

by dragonchild (Archbishop)
on May 14, 2003 at 16:58 UTC ( [id://258165]=note: print w/replies, xml ) Need Help??


in reply to Re: Comparison result capture???
in thread Comparison result capture???

Didn't you mean
my $x; ($x = $a_parts[$_] <=> $b_parts[$_]) && return $x for 0 .. $#a_parts;
You're using $_ too many times.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re: Re: Re: Comparison result capture???
by chip (Curate) on May 14, 2003 at 20:44 UTC
    I'll grant you that my code uses $_ with more than one meaning, and some people may not like that. But it's clear enough to me. Seems to work, too.

        -- Chip Salzenberg, Free-Floating Agent of Chaos

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://258165]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found