Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: For loop Help

by neniro (Priest)
on Apr 02, 2004 at 16:38 UTC ( [id://342026]=note: print w/replies, xml ) Need Help??


in reply to For loop Help

Okay, it is ugly, but it works:
#!/usr/bin/perl use strict; use warnings; my %result; while(<DATA>) { m#(\d{2})/(\d{2})/(\d{4})#; $result{$3. $2. $1} = $_; }; my $highest = $result{(sort keys %result)[-1]}; print $highest, "\n"; exit; __DATA__ Record 0: Coll 02/14/2003 Charles S. 2862.30 00000 ISSUE WWW Record 1: Coll 03/17/2003 Peter C. 392.50 00000 ISSUE WWW Record 2: Coll 07/25/2003 John K. 10.00 00000 ISSUE CCC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-24 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found