Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: splitting a string into arbitrary lengths

by ihb (Deacon)
on Jun 23, 2005 at 20:49 UTC ( #469507=note: print w/replies, xml ) Need Help??


in reply to Re: splitting a string into arbitrary lengths
in thread splitting a string into arbitrary lengths

That is what I'd perhaps use too, depending on the application. If I'd chose this way I'd even tag along a success check (and add anchors). Your format may change some day and then you'll be glad you caught that.

my ($y, $m, $d) = $today =~ /^(\d\d\d\d)(\d\d)(\d\d)\z/ or die "Incorrect date format: '$today'";

ihb

See perltoc if you don't know which perldoc to read!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2020-10-24 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (246 votes). Check out past polls.

    Notices?