#!usr/bin/env perl use strict; use warnings; open (FILE1,"< file1"); while (!eof(FILE1)) { chomp (my$element1 = (<FILE1>)); open (FILE3,"< file3"); while (!eof(FILE3)) { my$element2 = (<FILE3>); if ($element2 =~ /$element1/) {print $element2;} } }
In reply to Re^3: print data with matching id from two different files
by mao9856
in thread print data with matching id from two different files
by mao9856
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |