\Z matches not a character, but a position. So it's useless to say "match end of the string, and then again end of the string".
With warnings enabled perl would have told you:
Quantifier unexpected on zero-length expression in regex; marked by <-- HERE in m/\Z{2} <-- HERE / at -e line 1.
In reply to Re: Printing last two characters
by moritz
in thread SOLVED Printing last two characters
by Slug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |