in reply to please help - c shell in perl
In general, if you need the output of a command, use backticks; if you don't, use system.for my $ip (@ips) { my $output = `nslookup $ip`; }
However, in this case, you should probably just use Perl builtins or the Socket module, if possible. For example, to translate a host name into an IP address:
use Socket; my $addr = inet_ntoa scalar gethostbyname $host;
|
|---|