in reply to perl if statement
From your other posts in this thread, especially this one, I get the feeling that you are searching the file for the literal string "username|pin" - is that correct? Because if so, your pattern is not correct, as it will match any line that contains either the username or the pin due to the alternation |. You should probably be using the pattern /^\Q$FORM{user}|$FORM{pin}\E$/ instead (see quotemeta for what \Q...\E does). Otherwise, you've built yourself a huge security hole if someone sets their password to, for example "."!
Could you show us an example of what your input file actually looks like?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl if statement
by Drsin (Novice) on Mar 02, 2016 at 14:52 UTC | |
by Drsin (Novice) on Mar 02, 2016 at 18:00 UTC |