Sun751 has asked for the wisdom of the Perl Monks concerning the following question:
Any body have any suggestion how can I make it more Perlish?Please,system($command); if ($? == -1 ) { $step = $step -1; display_err($command,$step); exit; } sub display_err { my ($cmd,$step)= @_; open(LOG, ">>release_log.log")|| die "Unable to open release_log.log f +or output: $!\n"; print LOG <<HEADING; ================================================================== HEADING print LOG "[Command Execution Failed]\n"; print LOG "Command: $cmd\n"; print LOG "Command Succeful upto: $step\n"; print LOG scalar localtime(); close LOG; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Looking for Perlish log out put
by apl (Monsignor) on Jul 16, 2009 at 01:33 UTC | |
|
Re: Looking for Perlish log out put
by Anonymous Monk on Jul 16, 2009 at 01:19 UTC |