Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Splitting Array with Variable Spaces

by ImpalaSS (Monk)
on Nov 02, 2000 at 23:35 UTC ( #39725=note: print w/replies, xml ) Need Help??


in reply to Splitting Array with Variable Spaces

UPDATE the code i posted is wrong, it was not the code i used.
the code i used is:
foreach $item(@sorted){ @new=split(/ /,$item); print $new[13]; if($new[13] > $new [10]){ print $item; }
Sorry for the confusion
Dipul

Replies are listed 'Best First'.
RE: Re: Splitting Array with Variable Spaces
by Shendal (Hermit) on Nov 02, 2000 at 23:39 UTC
    Try splitting on /\s+/. For example:
    foreach $item(@sorted){ @new=split(/\s+/,$item); print $new[13]; if($new[13] > $new [10]){ print $item; }


    Cheers,
    Shendal

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2023-03-23 18:15 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?