if ($hostUrl =~ m/(org|net|com|co|edu|gov)/ ) { open NAGHOST, "+>>$host_file" or die "can't open the $host_file $!"; print "\nboo\n"; while (my $line = ) { #check for duplicate file if ($line =~ m/($hostName|$hostUrl)/) { print "Looks like the data you entered is already on file\n"; } #no duplicate, move forward else { print "\nbah\n"; } } #### boo