if ($rv == -1) { print "failed to execute: $!\n"; } ...