Perl: “$” doesn’t really mean end of string
Who ate my newline? It’s 2023, Perl is ranked below COBOL, but I still consider it as my loyal working horse. But even the most loyal horse will give you a grand kick in the bottom every now and then. So let’s jump to the problematic code: #!/usr/bin/perl use warnings; use strict; my $str = [...]