Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: splitting a string into arbitrary lengths

by bmann (Priest)
on Jun 22, 2005 at 21:40 UTC ( [id://469208]=note: print w/replies, xml ) Need Help??


in reply to splitting a string into arbitrary lengths

unpack

my ($tyear, $tmon, $tday) = unpack( 'A4A2A2', '20050622' );

If you choose to use this, you might also want to read pack and perlpacktut

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-03-29 08:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found