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

Re: One liner: split fixed-width field into equal length chunks...

by OM_Zen (Scribe)
on Mar 21, 2003 at 18:09 UTC ( [id://244960]=note: print w/replies, xml ) Need Help??


in reply to One liner: split fixed-width field into equal length chunks...

Hi ,

This shall also do the things you require

my $a = "HereIsTheStringAsString"; my $n = 5; while($a =~/.{1,$n}/){print "$&\n"; $a = $'}; __END__ HereI STheS tring AsStr ing
  • Comment on Re: One liner: split fixed-width field into equal length chunks...
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found