http://qs1969.pair.com?node_id=1147567


in reply to Break the foreach loop on count on 50 and then insert a new foreach loop

BTW, for this type of thing:
my $appendCmd = "iptablesAdm append"; $appendCmd .= " --type=rule"; $appendCmd .= " --table=filter"; $appendCmd .= " --chain=INPUT"; $appendCmd .= " --protocol=${protocol}"; $appendCmd .= " --domain=${domain}"; $appendCmd .= " --persist=yes";
you can just do this:
my $appendCmd = "iptablesAdm append" . " --type=rule" . " --table=filter" . " --chain=INPUT" . " --protocol=${protocol}" . " --domain=${domain}" . " --persist=yes";