Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by MeowChow (Vicar)
on Apr 24, 2001 at 10:15 UTC ( #74971=categorized answer: print w/replies, xml ) Need Help??

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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
vrk adds oatmeal raisin cookies to the platter on the sideboard.

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-04-24 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (437 votes). Check out past polls.