Tii has asked for the wisdom of the Perl Monks concerning the following question:
I have a problem that is really basic, but I'm having a hard time solving it.
I am trying to search a given string for the character *.
I have an if statement that calls a function to do some processing if 1 or more *'s are present in a string.
This is my approach:
But, for some reason, this isn't doing what I want. Can "someMonk" please help me out?if ($a =~ /\*/) { # call some function } else { # do something else }
Thanks a bunch,
Tii
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching * in a pattern
by Nimster (Sexton) on Jul 26, 2000 at 09:55 UTC | |
by mwp (Hermit) on Jul 26, 2000 at 09:56 UTC | |
|
Re: Matching * in a pattern
by turnstep (Parson) on Jul 26, 2000 at 06:34 UTC | |
|
Re: Matching * in a pattern
by Tii (Monk) on Jul 26, 2000 at 16:46 UTC | |
by turnstep (Parson) on Jul 26, 2000 at 17:50 UTC | |
|
RE: Matching * in a pattern
by steveAZ98 (Monk) on Jul 26, 2000 at 07:26 UTC |