Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-09-19 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (128 votes), past polls