Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Append problem!!PLS HELP!

by jesuashok (Curate)
on Aug 14, 2007 at 03:08 UTC ( [id://632376]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://632376]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found