in reply to Re: Comparing multiple strings
in thread Comparing multiple strings
i have tried list util. but dont know the problem
THIS DONT WORK $my1 = # IS "EV-1891" OR "EV-DKL1" thats wat we want; #THEN AM TRYING TO COMPARE IF NOT $my1 results if (any { $my1 ne $_ } 'EV-1891', 'EV-DKL1') { print "BAD"; last; } # MAKE OTHER NEXT CONDITION ACCESSIBLE IT ONLY WORKS WHEN I REMOVE 1 STRING THIS WORKS if (any { $my1 ne $_ } 'EV-1891') { print "BAD"; last; } # NEXT CONDITION ACCESSIBLE
and my problem i want to compare two things ( if we dont get EV-DKL1 or EV-1891) show error
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Comparing multiple strings
by pryrt (Abbot) on Jan 15, 2019 at 22:35 UTC | |
by pryrt (Abbot) on Jan 15, 2019 at 22:42 UTC | |
|
Re^3: Comparing multiple strings
by hippo (Archbishop) on Jan 15, 2019 at 22:36 UTC |