Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 pondering the Monastery: (7)
As of 2014-10-21 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (95 votes), past polls