in reply to Re: print data with matching id from two different files
in thread print data with matching id from two different files

Please excuse me I forgot to mention that I removed semicolon and inverted commas using awk. So my written code is for a file3 without semicolon and inverted commas.Yes,there is tab in file3.

  • Comment on Re^2: print data with matching id from two different files

Replies are listed 'Best First'.
Re^3: print data with matching id from two different files
by hippo (Archbishop) on Nov 02, 2017 at 09:49 UTC

    In that case the likely problem is here:

    open FILE3, "< file3" or die; while (<FILE2>) {

    As you can clearly see, you open FILE3 but try to read from FILE2 which is not opened. Running your code gives you this warning:

    Name "main::FILE2" used only once: possible typo at 1202408.pl line 14.

    which should have alerted you to this. Always address the warnings.