in reply to Useless Program

Also, I guess it'd be faster if you chop the last character of the line ("\n") and then compare with the name, like this:
#open the file while ($name_on_file = <FILE>) { chop $name_on_file; if ($name eq $name_on_file) { #found the name exit; }; }; #ask for the name, and everithing

Replies are listed 'Best First'.
RE: Re: Useless Program
by Aighearach (Initiate) on Jun 02, 2000 at 06:00 UTC
    chop should be changed to chomp, as chomp is safe, and will only chop the record seperator. ( newline, unless you changed the value of $/ )
    Paris Sinclair    |    4a75737420416e6f74686572
    pariss@efn.org    |    205065726c204861636b6572
    I wear my Geek Code on my finger.