in reply to HELP - nslookup in perl
#!/usr/bin/perl use strict; open(INPUT_FILE, "ipnum"); my @array = <INPUT_FILE>; #this puts each line of ipnum into an array close(INPUT_FILE); for my $line (@array) { my @output = `nslookup $line`; print "@output"; }
You might want an appropriately placed chomp() in there somewhere if newlines cause you some problems.
|
|---|