in reply to Web based perl REPL
I was expecting $1 to contain "this is ".> my $x='this is a test' this is a test > $x=~m/(.+)a/ 1 > $1 > print $1 1
Update:I can get the results I want using alternative syntax:
So Regexen work fine - its just the $1..$n appear not to be available.> my $x='This is a test for web perl parsing'; This is a test for web perl parsing > my ($what_test) = $x =~m/for (.+)/; 1> $what_test web perl parsing
"A closed mouth gathers no feet." --Unknown
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Web based perl REPL
by BUU (Prior) on Dec 04, 2006 at 08:03 UTC |