Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: joining files

by JaWi (Hermit)
on Oct 17, 2002 at 11:19 UTC ( #205986=note: print w/replies, xml ) Need Help??

in reply to joining files

Beside all the Perl solutions given above, you could also use the join util, however, this only works if you've got GNU's textutils installed.
This would make your code look something like this:
... my $joined_file = `join FILE1 FILE2` ...

-- JaWi

"A chicken is an egg's way of producing more eggs."

Replies are listed 'Best First'.
Never rebuild a Michelin
by samurai (Monk) on Oct 17, 2002 at 12:57 UTC
    JaWi is absolutely right. You should NEVER rebuild a wheel (especially a GREAT wheel that's already written in C by the GNU fellas) in perl unless you're on a system where you absolutely CANNOT use them or are writing something that HAS to be VERY portable.

    And in case you're wondering, you can even have the GNU utilities on a Win32 system. Check out It includes the join GNU utility. Excellent stuff, use it all the time.

    perl: code of the samurai

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2023-12-02 06:21 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (13 votes). Check out past polls.