Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2017-07-22 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (342 votes). Check out past polls.