Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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 http://gnuwin32.sourceforge.net/. It includes the join GNU utility. Excellent stuff, use it all the time.

    --
    perl: code of the samurai

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2022-08-19 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?