Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub found { open FH, "$data" or die "Can't open $data: $!"; flock (FH, 1) or die "Can't lock $data for reading"; while (<FH>) { my ($username,$surname,$firstname,$secondname)=split (/\t/,$_); my $item = shift (@partners); if ($item eq $username) { print qq{$firstname $secondname $surname}; } } }
20040205 Edit by Corion: Added missing closing code tag
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: while statement only picks up first line
by dws (Chancellor) on Feb 05, 2004 at 22:54 UTC | |
|
Re: while statement only picks up first line
by graff (Chancellor) on Feb 06, 2004 at 04:40 UTC | |
|
Re: while statement only picks up first line
by jonnyfolk (Vicar) on Feb 05, 2004 at 22:56 UTC | |
by graff (Chancellor) on Feb 06, 2004 at 04:27 UTC | |
|
Re: while statement only picks up first line
by stvn (Monsignor) on Feb 05, 2004 at 22:59 UTC |