Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Answer: How can I split a string into chunks of size n bytes?

( #74971=categorized answer: print w/ replies, xml ) Need Help??

Q&A > strings > How can I split a string into chunks of size n bytes? contributed by MeowChow

push @bits, substr $scalar, 0, $bytes, '' while length $scalar;

Comment on Answer: How can I split a string into chunks of size n bytes?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-08-30 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (351 votes), past polls