* Leon Timmermans <fawaka@gmail.com> [2012-06-05T18:24:20]
> On Wed, Jun 6, 2012 at 12:20 AM, Leon Timmermans <fawaka@gmail.com> wrote:
> >
> > I think /(??{ $some_pattern_string })/ should do the same as
> > /$some_pattern_string/, so I would see this as a bug.
Do you think this is also a bug?
use 5.16.0;
my $str = 'foo';
my $sub_re = '(f)';
$str =~ /(??{ $sub_re })/;
my $lazy_1 = $1;
$str =~ /$sub_re/;
my $eager_1 = $1;
say "LAZY1: $lazy_1";
say "EAGER: $eager_1";
Produces:
LAZY1:
EAGER: f
--
rjbs
Thread Previous
|
Thread Next