in reply to Automating whois??

You could use backticks(`) to capture the STDOUT of the nslookup, and then write to the files w/o storing them in an array. Maybe something like this.
open(OURS, '>/path/to/ours'); open(THEIRS, '>/path/to/theirs'); open(UNKNOWN, '>/path/to/unknown'); foreach my $line (@domain) { chomp $line; print "running whois on $line\n"; my $output = `$cmd $line`; if(#ours){ print OURS "$line\n"; }elsif(#theirs){ print THEIRS "$line\n"; }else{ print UNKNOWN "$line\n"; } } close(OURS); close(THEIRS); close(UNKNOWN);

- Tom

Replies are listed 'Best First'.
Re: Re: Automating whois??
by sunadmn (Curate) on Nov 10, 2003 at 19:42 UTC
    Well I am not sure that will work since the output of the whois is very long and this info will have to be sorted, so I assume to match the data I am lookin for.Below is an example of a whois so you can have a better understanding of what our command output is.

      You will need to parse the output from the command to get the data you want out of it. You can either read the entire output into memory with backticks. Or read from the command line by line with open pipes. The results aren't that large as long as you don't keep it all in memory for every domain. How you want to handle the parsing makes more difference.