in reply to japhy has met his match

use Magic; tilt() if ($str =~ m/$Magic::selfish/ && ${str}abc !~ m/$Magic::selfish/); tilt() if ($Magic::selfish =~ m/$str/ && ${Magic::selfish}abc !~ m/$str/);
Matching is a one-to-many operation. More succintly:
die "42" if ${Magic::selfish}z !~ m/$Magic::selfish/;
You're tilting at a windmill.

After Compline,
Zaxo