Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
text file: 1|paul 2|simon etc
Any suggestions or advice would be great, Thanksprint "Name:\n"; $file= <stdin>; open (FH, "names.txt") or die "$!"; while (<FH>) { if (m/\|$file$/) { #naturally this does not work print "$num_entry\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pattern match a name from stdin
by davido (Cardinal) on Oct 05, 2005 at 15:42 UTC | |
|
Re: pattern match a name from stdin
by anniyan (Monk) on Oct 05, 2005 at 15:41 UTC | |
|
Re: pattern match a name from stdin
by JediWizard (Deacon) on Oct 05, 2005 at 15:44 UTC | |
by Anonymous Monk on Oct 05, 2005 at 15:56 UTC | |
by japhy (Canon) on Oct 05, 2005 at 16:34 UTC |