Closed p5pRT closed 20 years ago
My co-worker ran into this problem. It appears that a compiled regex used inside a /x pattern needs to be /x as well. The following demonstrates:
$pat = 'foo'; $c_pat = qr/foo/; $c_pat_fixed = qr/foo/x;
$string = 'foo';
$\ = $/; print 'normal: '\, $string =~ / $pat /x ? 'Yes' : 'No'; print 'qr: '\, $string =~ / $c_pat /x ? 'Yes' : 'No'; print 'fixed qr: '\, $string =~ / $c_pat_fixed /x ? 'Yes' : 'No';
I've noted this failure under 5.005_03/Linux and 5.005_02/Linux
Migrated from rt.perl.org#932 (status was 'resolved')
Searchable as RT932$