Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: print data with matching id from two different files

by mao9856 (Sexton)
on Nov 02, 2017 at 12:17 UTC ( [id://1202613]=note: print w/replies, xml ) Need Help??


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

#!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;} } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-23 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found