#!/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.
In reply to Re: HELP - nslookup in perl
by ender
in thread HELP - nslookup in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |