in reply to Add Perl Varibles in system()
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Add Perl Varibles in system()
by FunkyMonk (Bishop) on May 11, 2009 at 22:25 UTC | |
by John M. Dlugosz (Monsignor) on May 11, 2009 at 23:02 UTC | |
by ikegami (Patriarch) on May 11, 2009 at 23:09 UTC | |
|
Re^2: Add Perl Varibles in system()
by ikegami (Patriarch) on May 11, 2009 at 23:04 UTC | |
by ahjohnston25 (Initiate) on May 12, 2009 at 20:50 UTC | |
by ikegami (Patriarch) on May 12, 2009 at 21:37 UTC |