rather than using the "indirect object" form.system (qq(nmap "$target"));
Also, your line my ($target); should be my $target;. Don't add extra parens because they are pretty to you—that will bite you later because that is not the actual syntax. You are specifying list context there. Normally when list context is needed you might say (my $s)=func_returning_list();, with the my on the inside. Note that you would not say my ($x,$y) as that is actually a syntax error.
—John
In reply to Re: Add Perl Varibles in system()
by John M. Dlugosz
in thread Add Perl Varibles in system()
by ahjohnston25
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |