my @a=(); my $res = Net::DNS::Resolver->new; my $query = $res->query(".ohnet", "NS"); if ( $query != 0 or $query != undef or $query != ' ' ) { foreach ($query->answer) { if ( $_->type eq 'NS' ) { #next unless $_->type eq "A"; #print $_->nsdname,"\n"; foreach ($_->nsdname) { push @a,$_; $a++; } print $a[1]; }else{ ..... } } }
The end output looks like svrqip01 svrqip02 svgqip01 svgqip02 svvqip01 svvqip02 and in the end all I want is svrqip 01 and 02 which is why I am assigning $_->nsdname to an array, but the only element that is getting any data is 0??? thank you, derek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>