Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: File Locking

by sligi (Sexton)
on Nov 16, 2001 at 02:11 UTC ( #125700=note: print w/ replies, xml ) Need Help??


in reply to File Locking

Hmm... Seems like you have empty @friends there. The loop should probably be something like:

while(<MYFILE>) { if (m/^$newfriend$/) { print "You are already on the list!\n"; exit; } push @friends, $_; }
...or one could of course concatenate to the file.

--
Jaska


Comment on Re: File Locking
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://125700]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-07-05 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls