September 25th, 2013, 05:10 PM
Compare two files and fetch data
I have two files to compare
One file contains
Second file contains
I have to check if there is completely common entries in the first column of both files than it should fetch the data in fornt of it
so for above example expected output is
Kindly help me regarding this.
September 25th, 2013, 06:24 PM
Pretty easy. All you have to do is use a lookup hash table and the split() function.
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
September 26th, 2013, 05:05 AM
Thanks for reply.
Sorru but I never used lookuphash table in perl code
I was doing this using unix code but did not wrk with this data because of similar entries.
September 26th, 2013, 09:51 AM
September 26th, 2013, 12:55 PM
Maybe it is time to start. You have been coming here (and at least one other forum) looking for Perl solutions for at least 18 months, you should be able to use a hash by now. When I took up Perl, it took me about 2 hours (actually, probably less) before I started to use hash tables.
Originally Posted by manigrover