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

Comparison result capture???

by shemp (Deacon)
on May 14, 2003 at 16:15 UTC ( [id://258145]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    ...
    sub ip_sorter {
    
  2. or download this
        my @a_parts = split /\./, $a;
        my @b_parts = split /\./, $b;
    
        my $result;
        map { return $result if $result = ($a_parts[$_] <=> $b_parts[$_]) 
    +} (0 .. $#a_parts);
    
  3. or download this
    ...
       map { return $^C if ($a_parts[$_] <=> $b_parts[$_]) };
    ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-23 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found