Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: split help

by pzbagel (Chaplain)
on Sep 22, 2003 at 17:39 UTC ( [id://293208]=note: print w/replies, xml ) Need Help??


in reply to Re: split help
in thread split help

Plankton, great answer! Now you can use a array slice to throw away what you don't need:

#!/usr/local/bin/perl my $data='DATETIME 09:59:11'; my $sout = (split /[\s,:]/, $data)[1]; print $sout ."\n";

Later

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-28 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found