SPUG: TK perl

Jay Scherrer jay at scherrer.com
Tue Sep 7 13:21:38 PDT 2010


  Your problem is in the following line:

  open(DATA,">$file_name") or die "$0 ERROR: write $file_name - $!";

You are opening the file but if it exists everything will be erased.
Instead open the file for both reading and writing with:

  open(DATA,"+<$file_name") or die "$0 ERROR: write $file_name - $!";

Jay Scherrer



On 09/07/2010 11:43 AM, thomas lems wrote:
>   open(DATA,">$file_name") or die "$0 ERROR: write $file_name - $!";



More information about the spug-list mailing list