R
rihad
Hello, Perl hackers,
I'm writing a Perl script that runs FreeBSD's ipfw(8) and writes
certain commands to it through a pipe, line by line:
open OUT, "|-", "ipfw", "/dev/stdin" or die "$! $?";
while (1) {
print OUT $command, "\n";
}
Sometimes $command causes parse errors (due to manipulation of a
nonexistent rule, or similar), and ipfw dies... Is there any way to
catch and acknowledge that fact, and re-run myprog for subsequent
iterations?
I'm writing a Perl script that runs FreeBSD's ipfw(8) and writes
certain commands to it through a pipe, line by line:
open OUT, "|-", "ipfw", "/dev/stdin" or die "$! $?";
while (1) {
print OUT $command, "\n";
}
Sometimes $command causes parse errors (due to manipulation of a
nonexistent rule, or similar), and ipfw dies... Is there any way to
catch and acknowledge that fact, and re-run myprog for subsequent
iterations?