Perl-Sensitive Sunglasses | |
PerlMonks |
Re: problem with system functionby Kanji (Parson) |
on Dec 05, 2002 at 19:44 UTC ( [id://217869]=note: print w/replies, xml ) | Need Help?? |
The way that you're calling system() bypasses the shell, so you're giving $CMD just 2 arguments (neither of which are valid switches for iptables) instead of the 12 you would be passing if you'd run that from the command line. Instead, you want to force pre-parsing by the shell... system("$CMD $arg1 $arg2"); ...or emulate that behaviour yourself by making $arg1 and $arg2 arrays instead...
--k.
In Section
Seekers of Perl Wisdom
|
|