Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by OM_Zen (Scribe)
on Mar 21, 2003 at 18:09 UTC ( #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
Node Status?
node history
Node Type: note [id://244960]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (15)
As of 2015-07-06 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (74 votes), past polls