in reply to Re^2: perl if statement
in thread perl if statement
One quick and simple possibility is as follows:
my $infile = "/export/install/users.txt"; open my $IN, "<", $infile or die "Cannot open $infile $!"; my @lines = <$IN>; if (grep /($FORM{user}|$FORM{pin})/i, @lines) { # ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: perl if statement
by Drsin (Novice) on Mar 01, 2016 at 14:06 UTC | |
by poj (Abbot) on Mar 01, 2016 at 14:19 UTC | |
by Anonymous Monk on Mar 01, 2016 at 14:25 UTC |