in reply to checking input using grep()
die unless grep { /^\Q$input\E$/ } @var;
But you'd really be better off using eq:
die unless grep { $_ eq $input } @var;
-- Chip Salzenberg, Free-Floating Agent of Chaos
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: checking input using grep()
by Aristotle (Chancellor) on Dec 28, 2001 at 09:28 UTC | |
by chip (Curate) on Dec 29, 2001 at 00:14 UTC | |
by Aristotle (Chancellor) on Dec 29, 2001 at 00:39 UTC |