Reading from and writing to the same open filehandle is tricky.
It may be better to open the file in read mode, read in the data, close the file, process the data, open again in write mode ( '>' ) and write the whole file anew.
You could also adapt the technique to save a backup copy of the file before you write out the new data.
HTH
In reply to Re: Script wont run
by 1nickt
in thread Script wont run
by cbtshare
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |