nysus has asked for the wisdom of the Perl Monks concerning the following question:
So I wrote this:
But still got this: yesno-------------------------- my $pattern = "homey"; my $value = "homeylovekins"; match(); $pattern = "wigwam"; match(); sub match { if ($value =~ /$pattern/o) { print "yes"; } else { print "no"; } } -------------------------------------
What am I missing? Shouldn't the pattern match string remain "homey" for the duration of the script per the perldoc? Thanks, Monks.
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: 'o' modifier clarification needed
by tye (Sage) on Jul 14, 2001 at 10:12 UTC | |
by nysus (Parson) on Jul 14, 2001 at 10:51 UTC | |
by blakem (Monsignor) on Jul 14, 2001 at 10:51 UTC | |
by nysus (Parson) on Jul 14, 2001 at 10:15 UTC | |
|
(crazyinsomniac) Re: 'o' modifier clarification needed
by crazyinsomniac (Prior) on Jul 14, 2001 at 17:16 UTC | |
by Dominus (Parson) on Jul 14, 2001 at 18:22 UTC | |
|
Re: 'o' modifier clarification needed
by MeowChow (Vicar) on Jul 14, 2001 at 19:19 UTC | |
|
Re: 'o' modifier clarification needed
by jeroenes (Priest) on Jul 14, 2001 at 10:18 UTC | |
|
Re: 'o' modifier clarification needed
by Anonymous Monk on Jul 16, 2001 at 15:53 UTC | |
|
Re: 'o' modifier clarification needed
by demerphq (Chancellor) on Nov 20, 2001 at 02:53 UTC |