in reply to Re^2: Regex help needed
in thread Regex help needed
or even:$foo = "3"; $bar = 4 + $foo;
In my snippet, '%' is pattern by virtue of it being the first argument of split, not because of some "undocumented extension".my $pattern = "foo|bar"; say "Match" if $str =~ $pattern;
Note also this snippet from the split documentation:
As a special case, specifying a PATTERN of space (' ') will
split on white space just as "split" with no arguments does.
Note how the documentation talks about a pattern, while using quotes to delimit said pattern.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regex help needed
by choroba (Cardinal) on Apr 24, 2012 at 09:09 UTC | |
|
Re^4: Regex help needed
by BillKSmith (Monsignor) on Apr 23, 2012 at 21:01 UTC |