Subject: | Example from Synopsis fails with syntax error |
#!/usr/bin/env perl
use 5.018;
use warnings;
use Regexp::Common;
while (<>) {
/$RE{num}{real}/ and print q{a number};
/$RE{quoted}/ and print q{a ['"`] quoted string};
/$RE{delimited}{-delim=>'/'}/ and print q{a /.../ sequence};
/$RE{balanced}{-parens=>'()'}/ and print q{balanced parentheses};
/$RE{profanity}/ and print q{a #*@%-ing word};
}
syntax error at recommon.pl line 10, near "/$RE{balanced}{-parens=>'("
(Might be a runaway multi-line '' string starting on line 9)
Can't find string terminator "'" anywhere before EOF at recommon.pl line 10.