< Tuna scrathces his head>
In my program, I execute a subroutine N times. This subroutine calls external programs, which return either 0 or 1. I need to keep track of how many times "external.pl" fails. If it fails > 2x, I will enter another sequence of subroutines.
Here's an example:
## In main, I initialize,
my $failedActivation = 0;
if ($failedActivations eq 3 )
$offlineStatus = &executeTaskSequence($clusterHost, @offLineSequence);
$command = "/bin/ls";
($error = &runSystemCommand($command)) && $failedActivations++;
print "failed $failedActivations times\n";
If I inject an obvious error into the subroutine, such as rename $command to "/bin/lssss", my print statement still prints 0. Any ideas?