Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2015-11-26 00:22 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (693 votes), past polls