in reply to Re: comparing file contents
in thread comparing file contents
This looks confused. print IN $anything_at_all will write to the IN file. Are you trying to overwrite the data in 'female1.txt'? Luckily, Perl will not let you, because you opened the file as read-only. Your original description says "...should be replaced with ICD-code files corresponding...", but you are not outputting the entire line. Is the '>>' a debugging marker, or does it indicate that you are trying to append to a file? Going by your original description, I think you need:
I need to overwrite the result in 'female1.txt' instead of writing in a new output file
.can that be achieved by changing the 'female1.txt' in to read and write mode
print {$out_fh} join( ' ', @cols ), "\n"to
print {$in_path} join( ' ', @cols ), "\n"Let me know if there is any other way to do this. thanks for your help in advance. your explanations are really good. I appreciate your time and effort for helping
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: comparing file contents
by Util (Priest) on Nov 23, 2011 at 01:59 UTC | |
by kumaar1986 (Initiate) on Nov 26, 2011 at 16:01 UTC | |
by Anonymous Monk on Nov 26, 2011 at 16:46 UTC | |
by kumaar1986 (Initiate) on Nov 28, 2011 at 00:56 UTC |