If you're using this as a general technique, you should also be very careful that your @find array doesn't contain any other special characters like "(", or "[". Just because you write characters as escape sequences doesn't give them any special status: they're just characters.
Ah, but if he takes my suggestion and writes each expression as
qr"\x...blah blah..."s, then those escape sequences do in fact make the characters unspecial, and he can use this technique with impunity. For example, to his original code add the expressions
qr"\x06\x2E"s and
"\x06\x2E" - the one inside
qr will not match, since in it the
\x2E is seen as a literal, whereas without
qr you'll get the problem you're talking about. (For those of you without the ASCII table memorized,
\x2E is
.)
For full details, see perlop, especially the section "Gory details of parsing quoted constructs".
--
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
map{y/X_/\n /;print}map{pop@$_}@/for@/