1832890 Members
2206 Online
110048 Solutions
New Discussion

join command in perl?

 
Benjamin Cheong
Occasional Contributor

join command in perl?

Hi all,

Basically, what I'm trying to do is compare two large CSV files and find out which fields have changed since the last update. Based on that, I want to produce comparison files based on which field was different.

I know of a way to do this using the 'join' command in HP-UX (please see http://www.opengroup.org/onlinepubs/009695399/utilities/join.html for details), but I would like to do this in Perl.

Would appreciate any help!

Cheers,
Ben
1 REPLY 1
H.Merijn Brand (procura
Honored Contributor

Re: join command in perl?

you can use two hashes and use the `key' fields as hash key (maybe packed - see perldoc -f pack), and compare the values for each key that occurs in both hashes

Have a look at CPAN modules Text::CSV_XS and Text::Diff

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn