http://www.perlmonks.org?node_id=2352


in reply to Checking user's IP....

You could log the IP addresses to a file and then search it. If you're running your site with a database you could log them to a table.
$address=$ENV{REMOTE_ADDR}; open FILE, "<logaddresses.dat"; my $addresses; { local $/=undef; $addresses=<FILE>; } close FILE; if($addresses=~/\Q$address/){ print "You already voted\n"; } else{ open FILE, ">>logaddresses.dat"; print " $address\n"; close FILE; # update poll; } #display results;
if you want code for a database solution let me know