in reply to Regex Capturing: Is this a bug or a feature?
E.g.{ # localize the variables # the block }
Cheers,{ local ($1, $2) = ($1, $2); # OK, so you can't actually write this. # The hacky can write local (*1, *2) = \($1, $2); instead. # Your loop: foreach my $symbol (@syms){ local $test; $symbol=~m/(\w+)\.(\d+)/; print "symbol: $symbol\t\$1: $1\t\$2:$2\n"; print "test is ",$test++,"\n"; my ($ts,$te) = ($1,$2); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regex Capturing: Is this a bug or a feature?
by shotgunefx (Parson) on Sep 28, 2002 at 21:31 UTC | |
by Anonymous Monk on Sep 29, 2002 at 00:57 UTC | |
by krusty (Hermit) on Sep 29, 2002 at 02:45 UTC | |
by Anonymous Monk on Sep 29, 2002 at 14:26 UTC | |
by shotgunefx (Parson) on Sep 29, 2002 at 01:42 UTC | |
by Anonymous Monk on Sep 29, 2002 at 14:17 UTC | |
by shotgunefx (Parson) on Sep 29, 2002 at 23:51 UTC | |
|