in reply to Typo in Exegesis 5?
There should be an 'x' there.# Perl 5 @cmd = ('get','put','try','find','copy','fold','spindle','mutilate +'); $cmd = join '|', map { quotemeta $_ } @cmd; $str =~ / (?:$cmd) \( .*? \) /;
I don't think > needs to be escaped when not used in <...>. I'd be surprised if rx/>/ were invalid....$deleteline = rx/^^ \< <sp> (\N* \n) / $appendline = rx/^^ \> <sp> (\N* \n) /
The first character on that line must be either a '<' or a '>'. Note that we have to escape these characters since angle brackets are metacharacters in Perl 6.
In Apocalypse 5, Larry uses ::, not . to separate grammar and rule names.$text =~ /<Diff.file>/; # Invoke through grammar
The O'Reilly CMS probably screwed this up.... $0/2002/08/22/exegesis5.html{hunk} ...
Those can't be completely equal, because the meaning of the $ metacharacter changed.# Perl 5 $str =~ m/ ^ m* (?:d?c{0,3}|c[dm]) (?:l?x{0,3}|x[lc]) (?:v?i{0,3}|i[vx +]) $ /ix; # Perl 6 $str =~ m:i/ ^ m* [d?c<0,3>|c<[dm]>] [l?x<0,3>|x<[lc]>] [v?i<0,3>|i<[v +x]>] $ /;
In Section
Seekers of Perl Wisdom