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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'm not sure I understand your problem; you might need to show what the output looks like. But if this is your actual code, one problem is that your if/else statement which does the printing is inside your while() loop that adds the French values, so it's going to print the whole thing every time it processes a line from your Italian-French file. That if/else section should be after the while loop, in its own for loop, as I showed in my last post to which you replied.

In other words, you'll have three independent loops:

  • A while loop to process the first file
  • A while loop to process the second file
  • A for loop to go through the hash and print the keys and values

None of these should be within the others.

Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.


In reply to Re^7: Need advice on checking two hashes values and keys by aaron_baugher
in thread Need advice on checking two hashes values and keys by perlynewby

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-23 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found