Re: Its a pretty simple question.. though embarassed to ask but i am totally new in perlby Laurent_R (Abbot)
|on Aug 13, 2013 at 21:42 UTC||Need Help??|
OK, following your messages on the chatterbox (I was not really on-line, I just had my browser still open on Perlmonks, but was not in front of my computer), I've just prepared a new version of the code that I supplied earlier.
I can't say if it does what you want, because I am still not even sure that I understood what you really want and because I don't have actual sample files on which to run tests, but at least, I tested that it should compile cleanly without any error or warning:
This what it should do:
So, if file1 has:
And file2 has:
The output would be:
That is at least what I understood from your initial description of your requirement.
As I already said, this program would need additional error-handling code (if the files don't match), but I am not going to go into that so long as I don't even know if this is what you need.