Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: divide by '/'

by astanley (Beadle)
on Apr 10, 2001 at 23:13 UTC ( [id://71539]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to divide by '/'

I'm not quite sure what you're saying you need to do...but getting and sorting the numbers should be simple. Just put both into it's own array, ie:
my (@left, @right) = (); foreach (@field) { m/\(([0-9]+)\/([0-9]+)\)/; my $leftnum = $1; my $rightnum = $2; push(@left, $leftnum); push(@right, $rightnum); }
once you have all the values in seperate arrays - just run the sort function on each.
I think that's what you were trying to say....once they're sorted you can put them back together or do whatever else you wish to do to them.

-Adam Stanley
Nethosters, Inc.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://71539]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.