in reply to File Locking
Hmm... Seems like you have empty @friends there. The loop should probably be something like:
...or one could of course concatenate to the file.while(<MYFILE>) { if (m/^$newfriend$/) { print "You are already on the list!\n"; exit; } push @friends, $_; }
--
Jaska
|
---|
In Section
Tutorials