Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl : Split/Regex

by 2teez (Vicar)
on Sep 03, 2014 at 22:55 UTC ( [id://1099483]=note: print w/replies, xml ) Need Help??


in reply to Perl : Split/Regex

Or just twisting the "if" statement of AppleFritter suggestion a bit like this:

if($fields[-1] eq 'Y'){ ...
there was no longer need for the bit // "" in the if statement. Just a timtoday!
for my $result (@results) { my @fields = split /\s+/, $result; if ( $fields[-1] eq 'Y' ) { push @streams, $fields[0]; } else { push @spaces, $fields[0]; } }

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-03-30 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found