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

Re: Efficient walk/iterate along a string

by AnomalousMonk (Monsignor)
on Nov 22, 2010 at 23:21 UTC ( #873074=note: print w/ replies, xml ) Need Help??


in reply to Efficient walk/iterate along a string

I haven't Benchmarked against anything, but unpack might be faster for splitting to an array:

>perl -wMstrict -le "my $str = 'abcde'; my @chrs = unpack '(a)*', $str; print qq{'$_'} for @chrs; " 'a' 'b' 'c' 'd' 'e'


Comment on Re: Efficient walk/iterate along a string
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-07-23 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (152 votes), past polls