in reply to $+ versus $^N
use strict; use warnings; my $plus; my $N; my $text = "abc123def"; my $text_match = qr/((\D+)(\d+))(?{ $plus = $+;$N = $^N })(\D+)/; $text =~ $text_match; print "$plus, $N\n"; $text_match = qr/(\D+)(\d+)(?{ $plus = $+;$N = $^N })(\D+)/; $text =~ $text_match; print "$plus, $N\n";
update:oh yeah the results:
-enlil__END__ 123, abc123 123, 123
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: $+ versus $^N
by diotalevi (Canon) on Apr 16, 2003 at 13:09 UTC |