print "Found it!\n" if (grep {/^I_am_looking_for_this$/o} @List);
Hmmmmm... effective, though I don't like it, it's a hell of a lot of code,my $Found=0; for (@List) { if (/^I_am_looking_for_this$/o) { $Found=1; last; }; }; print "Found it!\n" if $Found;
sub IsInThere(@) { for (@_) {return 1 if /^I_am_looking_for_this$/o} return 0; }; print "Found it!\n" if IsInThere(@List);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Beauty is in the eye of the beholder
by japhy (Canon) on Feb 20, 2001 at 18:15 UTC | |
by McD (Chaplain) on Feb 21, 2001 at 02:31 UTC | |
by japhy (Canon) on Feb 21, 2001 at 02:47 UTC | |
by McD (Chaplain) on Feb 21, 2001 at 05:58 UTC | |
by japhy (Canon) on Feb 21, 2001 at 03:02 UTC | |
by ChOas (Curate) on Feb 20, 2001 at 18:19 UTC | |
by japhy (Canon) on Feb 20, 2001 at 18:22 UTC | |
|
Re: Beauty is in the eye of the beholder
by Maclir (Curate) on Feb 21, 2001 at 02:39 UTC |