in reply to Wondering novice...

While a tied hash would be the easiest way to do this, using your method i see a severe lack of chomping.. obviously a newline thrown on $emailaddr is not going to compare true with $email....
open(RAFFLE_DAT,"< tickets.dat") || die "tickets.dat is not found."; while (<RAFFLE_DAT>) { chomp; ($tickennum,$emailaddr) = split(/::/, $_); if ($emailaddr eq $email) { &bademail(); } else { &goodemail(); }
will probably work as you expect it.