Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 musing on the Monastery: (12)
As of 2014-07-14 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (259 votes), past polls