Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: For loop Help

by esskar (Deacon)
on Apr 02, 2004 at 15:49 UTC ( #342008=note: print w/replies, xml ) Need Help??


in reply to For loop Help

sub compare { my ($x, $y) = @_; my $date1 = join("", reverse split(/\//, $x)); my $date2 = join("", reverse split(/\//, $y)); return $date1 <=> $date2; } my @ordered = map { compare($a, $b) } @effectivedate; print $ordered[0];

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2023-03-24 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?