Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Concatenate every 5 lines of input with a comma.

by jwkrahn (Monsignor)
on Jul 09, 2009 at 21:06 UTC ( #778702=note: print w/replies, xml ) Need Help??


in reply to Re: Concatenate every 5 lines of input with a comma.
in thread Concatenate every 5 lines of input with a comma.

Not even close:

$ seq 20 | perl -pe's/$/,/ if not$.%5' 1 2 3 4 5, 6 7 8 9 10, 11 12 13 14 15, 16 17 18 19 20,

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://778702]
help
Chatterbox?
[LanX]: yet another reason to miss yapc na this year
[shmem]: missing is an euphemism
[Discipulus]: a piano et¨de can be harmfull, anyway
[shmem]: grandola vila morena *sing*

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-04-29 22:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (534 votes). Check out past polls.