Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: splitting a string into arbitrary lengths

by ank (Scribe)
on Jun 23, 2005 at 00:35 UTC ( [id://469252]=note: print w/replies, xml ) Need Help??


in reply to splitting a string into arbitrary lengths

How about a regexp, but using the /x modifier:

my ($tyear, $tmon, $tday) = ($today =~ /^(\d{4}) # 4 digit year (\d{2}) # 2 digit month (\d{2})$/x); # 2 digit day

-- ank

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-19 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found