in reply to Working with a text file
If your files are not very big you can solve the problem with:
print F2 grep {/<EMP>/} <F1> ;
This will upload F1, and "grep" all the lines that contain "<EMP>"
A more gentle solution (that doesn't upload F1 in memory):
while (<F1>){ #Some conversions here print F2 if /<EMP>/; }
Hope this helps!
citromatik
PD: Your code seems to be valid. check if you are opening F2 correctly and try removing it before running the script again
|
|---|