Perl variables and apostrophes
This came up recently. I’d been using #2 for a while but never hit #1 which was a surprise.
my $person = "Ben"; print "Check out $person's cat\n"; #1 print "Say hi to '$person'\n"; #2 print "What about $person\'s hat\n"; #3 Output: Name "person::s" used only once: possible typo at test.pl line 6. Use of uninitialized value in concatenation (.) or string at test.pl line 6. Check out cat Say hi to 'Ben' What about Ben's hat