Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: print data with matching id from two different files

by wjw (Priest)
on Oct 31, 2017 at 13:42 UTC ( [id://1202432]=note: print w/replies, xml ) Need Help??


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

As I see it, there are two things that you need to do to solve a problem like this for yourself:

  • Use either the perl debugger perl -d myfile.pl" or, as mentioned, use Dumper, or you can use print statements - so that you can see the results, or lack thereof, of what your code is doing.
  • Use Perl documentation
.

You can check out the Perl debugger, and in particular: Stepping through code which, for the code you are writing should really be all you need. Doing those two things will save you lot of time and effort when it comes to answering questions like this.

One other thing you might consider doing as you are starting out: Literally write everything you need to do to get from what you have (two files with data), to what you want to get out at the end of your program. I have been programming for years (not that I am all that great at it) and still find that I save myself a lot of confusion by taking the time to write it out in plain language first. Often times it helps me predict ahead of time exactly where I am likely to have questions, thus allowing me to do some research ahead of time, so that by the time I get to coding, I have already addressed those areas with which I am unskilled or unfamiliar

Hope that is useful to you...

...the majority is always wrong, and always the last to know about it...

A solution is nothing more than a clearly stated problem...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2025-11-18 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.