http://www.perlmonks.org?node_id=398006

saintmike has asked for the wisdom of the Perl Monks concerning the following question:

Fellow monks, I must be doing something incredibly stupid to prevent this simple script from working:
use Perl6::Rules; grammar Foo { rule number { (\d+) { print "Found '$1'\n"; } } } "123" =~ m/<Foo.number>/;
Can you see why it doesn't capture the number but leaves $1 undef'd? Any help apprechiated.