Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
more useful options
 
PerlMonks  

Re: Re: split help

by matthewb (Curate)
on Sep 23, 2003 at 11:32 UTC ( [id://293534]=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 Re: split help
in thread split help

Somewhat daft but I notice that no one has mentioned the third argument to split yet:

use strict; use warnings FATAL => 'all'; # ;) my( $one, $two ) = split /:/, q[DATETIME 09:59:11], 2; print substr( $one, -2 );

From perldoc -f split:
If LIMIT is specified and positive, it represents the maximum number of fields the EXPR will be split into, though the actual number of fields returned depends on the number of times PATTERN matches within EXPR.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://293534]
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.