in reply to function called by regex
The document you refer to describes Perl 6. What version are you trying this with?