Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

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


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.

Replies are listed 'Best First'.
Re^3: print data with matching id from two different files
by hippo (Bishop) 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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-03-28 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found