Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Performance problems on splitting long strings

by Not_a_Number (Parson)
on Jan 30, 2014 at 19:26 UTC ( #1072718=note: print w/replies, xml ) Need Help??

in reply to Performance problems on splitting long strings

Is there any way of saying something like: "A4" repeated as many times as possible (until the end of the string?


my @array = unpack '(A4)*', $string;

Replies are listed 'Best First'.
Re^2: Performance problems on splitting long strings
by Laurent_R (Abbot) on Jan 30, 2014 at 19:41 UTC
    Thank you very much, I had overseen this option of unpack. Yous answer is really useful for me.

      Just FYI: You refer in several places to wanting groups of five characters, but  'A4' or  '(A4)*' will give you a group or groups of four characters, trailing-space padded if necessary.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2016-10-23 16:56 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (301 votes). Check out past polls.