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
In reply to Re^2: comparing file contents
by kumaar1986
in thread comparing file contents
by kumaar1986
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |