in reply to Re^3: Is there a way to avoid copy function from overwriting old contents?
in thread Is there a way to avoid copy function from overwriting old contents?
I was not storing it in a variable because it can contain a lot of information, since its an output coming after the execution of a command on a hardware device ! So had to store in a file and also I am parsing it for some keyword and if thats true then the above code is executed to append the result from the file to the log.if (true) {open (my $fh, ">> RESULT_LOG"); copy "Battery_Status", $fh;} else {print "Error";}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Is there a way to avoid copy function from overwriting old contents?
by furry_marmot (Pilgrim) on Apr 12, 2011 at 19:59 UTC |