Here's my take:
c:\@Work\Perl\monks>perl -wMstrict -le "my $re_obj = qr{([0-6BS])}; my $re_str = '' . $re_obj; print $re_str; ;; if ('ABC' =~ $re_str) { print qq{match, \$1 captured '$1'}; } else { print 'no match'; } " (?^:([0-6BS])) match, $1 captured 'B'
Give a man a fish: <%-{-{-{-<
In reply to Re: how to use string RE (against $_ and capture)
by AnomalousMonk
in thread how to use string RE (against $_ and capture)
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |