in reply to file updating question
... while(<>) { # do stuff print $whatever; } [download]
$ myscript < inputfile > outputfile [download]