I have a Perl process which runs on solaris under 5.8.3. It is started with the following command: su - prlusr -c "/usr/bin/perl -w /d/src/plpoll.pl >> /d/audit/`date '+%y%m%d'`.out 2>&1 &"
I would like to a daily basis at time switchover and after I have completed my processing, check to see if the audit log file exists(ie, I would pull in the latest time and see if the file say for the 16 Jun: /d/audit/040616.out exists. If it does not, then I want to close output to the current log file and reopen. What I want to replicate is: /d/src/plpoll.pl >> /d/audit/`date '+%y%m%d'`.out 2>&1 Does the above translate to: close(STDOUT); close(STDERR); then open(STDOUT, '>>' . $MyNewLog) open(STDERR, '>>' . $MyNewLog) There would be error checking on both opens. Are those closes and opens what is needed? if not, ay assistance would be appreciated? Note: At this point, I don't have a test box so trying to get a good idea of what is needed before trying to make the changes and insute the processing continues as it should. Thanks. Wags ;) ******************************************************* This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ******************************************************* -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>