Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Merging files, 1 line for every 10 (one-liner)

by BrowserUk (Pope)
on Sep 06, 2011 at 22:10 UTC ( #924474=note: print w/ replies, xml ) Need Help??


in reply to Merging files, 1 line for every 10

A one-liner:

perl -ple"printf q[%s], scalar <STDIN> unless $n++ % 10" file1 < file2

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: Merging files, 1 line for every 10 (one-liner)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://924474]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2014-10-20 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (73 votes), past polls