Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Append problem!!PLS HELP!

by jesuashok (Curate)
on Aug 14, 2007 at 03:08 UTC ( #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.


Comment on Re: Append problem!!PLS HELP!
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-07-26 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (179 votes), past polls