Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^3: concatenation of lines from two different filesby agianni (Hermit) |
on Aug 17, 2007 at 14:40 UTC ( [id://633314]=note: print w/replies, xml ) | Need Help?? |
If that's the case, you'll need to make the hash storing the contents of the first file a hash of arrays (or, rather, a hash of arrayrefs) rather than a simple hash, so you can store each line that matches the id:
Then when you want to output it at the end of the line you can:
Note that you'll just want to check for the length of the arrayref rather than definedness as in my original code.
In Section
Seekers of Perl Wisdom
|
|