G'day MattLG,
qr{...} does not return a string! See perlop - Regexp Quote-Like Operators for a description of what it does return. Here's an example:
$ perl -Mstrict -Mwarnings -E ' say q{*** Using qr{}}; my $re = qr{^.*$}; say ref $re; say $re; say q{*** Using q{}}; my $str = q{^.*$}; say ref $str; say $str; ' *** Using qr{} Regexp (?^u:^.*$) *** Using q{} ^.*$
Related documentation:
-- Ken
In reply to Re: Printing regular expression variable
by kcott
in thread Printing regular expression variable
by MattLG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |