Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Please can anyone help me with how to exactly match a user input line to a line in some file ?

Replies are listed 'Best First'.
Re: Exact line match
by MidLifeXis (Monsignor) on Feb 18, 2011 at 17:55 UTC

    See Equality Operators for string comparison. That will get you the statement for the comparison.

    Beyond that, it would be helpful to know what your proficiency level is with perl, especially how to read files, while loops, etc.

    --MidLifeXis

      well, i have already tried using equity operators and also used \b for exact string match. But its still not working.Can anyone help me out ?