Use of uninitialized value in hash element at D:\scripts\whois.pl line 21, line 1. #### #Program used to get an ip address via a whois query using the clwhois tool use strict; use warnings; my $cmd = 'd:\clwhois.exe'; my $ip = '192.168.1.1'; my $file = 'd:\temp\output.txt'; my ($email, %fields); system("$cmd $ip >$file") and warn "Can not execute $cmd: $!\n"; open (FILE, $file) or die "Can not open $file: $!\n"; while (){ /^(.*?): \s*(.*)$/; # Save text before colon in $1, and after # colon in $2 - Taken from the Camel Chp. 5.9 $fields{$1} = $2; # Creat %fields hash } # Save email address to $email depending on the whois db being used if ($fields{"TechEmail"} ne ""){ $email = $fields{"TechEmail"}; } elsif ($fields{"e-mail"} ne ""){ $email = $fields{"e-mail"}; } print "Email is $email\n";