Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Splitting a String into n-character parts, without using a regex

by Fastolfe (Vicar)
on Jan 26, 2001 at 03:28 UTC ( [id://54423]=note: print w/replies, xml ) Need Help??


in reply to Splitting a String into n-character parts, without using a regex

I might approach it like this:
push(@row, substr($string, 0, $len, '')) while length $string;
Of course, that still uses a while, but I suspect it'll still be faster than a regex.
  • Comment on Re: Splitting a String into n-character parts, without using a regex
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-19 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found