in reply to System and a question of style
Why don't you write a sub that does everything you want around each system call? That way you can change your mind later; add logging in one place, etc.
sub run_command { my $command = shift; system($command); if ($?) { my $rc = $? >> 8; die "Failed to run '$command': exit code $rc\n"; } } run_command('vxdg deport oracle'); run_command('something else ...');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: System and a question of style
by submersible_toaster (Chaplain) on Feb 07, 2003 at 05:42 UTC | |
by bsb (Priest) on Feb 07, 2003 at 06:42 UTC | |
by bronto (Priest) on Feb 07, 2003 at 11:24 UTC |