[sf-perl] qr{} question

yary not.com at gmail.com
Tue May 26 12:38:29 PDT 2009


You can work around it by either not using -x, or using a newline
instead of a space after [^#]+

use 5.10.0;
my $BAR = 'bar';
my $BAR_REGEX = qr{ $BAR [^#]+
-D $BAR }xms;
say $BAR_REGEX;
my $BAR2_REGEX = qr{$BAR[^#]+-D$BAR}ms;
say $BAR2_REGEX;


says:
(?msx-i: bar [^#]+
-D bar )
(?ms-xi:bar[^#]+-Dbar)


More information about the SanFrancisco-pm mailing list