in reply to Re^3: perl if statement
in thread perl if statement

Hi Laurent, Many thanks, it worked. The only issue is that the grep:  grep /($FORM{user}|$FORM{pin})/i only matches the first condition even when both conditions are on the same line.

Replies are listed 'Best First'.
Re^5: perl if statement
by poj (Abbot) on Mar 01, 2016 at 14:19 UTC

    see Alternation

    Try
    grep /($FORM{user}\|$FORM{pin})/i
                      ^ add \
    

      More likely /(\Q$FORM{user}|$FORM{pin}\E)/i is better!