in reply to exit status of a remote program

I recall doing something like this before, however you might want to have a look at the O'Reilly book "Programming Perl". I think there was a section on using exec|system and evaluating the return values.
my @args = ("/usr/bin/mt", "-f", "$$machine{tape}", "online"); my $status = system(@args) / 256; if( $status < 0 || $status > 0 ) { &error_code; }