Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: split on every n lines (tamwtdi)

by oiskuu (Hermit)
on Apr 10, 2014 at 18:11 UTC ( #1081846=note: print w/replies, xml ) Need Help??


in reply to split on every n lines

Employing list utils:

use List::MoreUtils 'part'; chomp(@$_), system("echo", @$_) for (part {$i++/5} <>);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1081846]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-11-24 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (351 votes). Check out past polls.

    Notices?