Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: seperating a string with substr...

by ysth (Canon)
on Jun 30, 2006 at 05:05 UTC ( [id://558508]=note: print w/replies, xml ) Need Help??


in reply to Re: seperating a string with substr...
in thread seperating a string with substr...

If $data may contain newlines, you'd want instead:
my @pieces = $data =~ /.{1,8}/gs;
(Also note that your () were unnecessary, since list context //g will return the entire match if there are no submatches.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-23 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found