in reply to Parse Puzzle

I'll bet you're running into the problem detailed at Zen and the Art of Match Variables. Change your code to use the return value of the expression. This just adds a check and returns an empty list on failure.

sub dis { return shift =~ /.?.?(.)/ ? $1 : (); }