barryscott has asked for the wisdom of the Perl Monks concerning the following question:
is there a way of doing something likeif ($string =~ /int/) ... elsif ($string =~ /char/) ... elsif ($string =~ /bool/) ... elsif ($string =~ /long/) ...
Please forgive my poor, c style attempt at a construct...if ($string =~ /(int)|(char)|(bool)|(long)/){ #my single action... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: multiple options for pattern match help
by lima1 (Curate) on Jan 08, 2008 at 15:37 UTC | |
by locked_user sundialsvc4 (Abbot) on Jan 08, 2008 at 16:46 UTC | |
Re: multiple options for pattern match help
by Corion (Patriarch) on Jan 08, 2008 at 15:27 UTC | |
Re: multiple options for pattern match help
by svenXY (Deacon) on Jan 08, 2008 at 15:32 UTC | |
Re: multiple options for pattern match help
by poolpi (Hermit) on Jan 08, 2008 at 15:46 UTC | |
by alexm (Chaplain) on Jan 08, 2008 at 23:20 UTC |