http://qs321.pair.com?node_id=632376


in reply to Append problem!!PLS HELP!

Hi,

sub appendToTsum { my ($trigger) = @_; my $foo = "/tmp/foo"; my $home = "\\\\t3file3\\datools\\tools\\MTP\\"; my $logfile = $home."logappend.txt"; open (LOG, ">>$logfile"); my $time = time(); $time = localtime($time); if(-e $foo){ open (SUM, ">>$foo") or print log "$time: Can't write to $foo" +; print SUM "\n\n*********************************************** +******\n"; print SUM "** $trigger **\n"; print SUM "*************************************************** +**\n"; close (SUM); } close (LOG); }
In the above code even if open ( SUM, ".." ) fails it keeps writting the content into SUM filehandle. Please check that too. That may lead to dodgy.