die <<HELP unless @ARGV == 2;
usage: transform.pl <word1> <word2>
The program finds a way from one word to other, like this:
% transform.pl love shit
love-lose-lost-loot-soot-shot-shit
HELP
my $left = shift(@ARGV) || 'love';
my $right = shift(@ARGV) || 'shit';
Because you die if there are not two arguments on the command line there is no way that $left and $right will ever be assigned the values 'love' and 'shit'.
for ($left, $right) {
$_ = lc;
tr/A-Za-z//cd;
}
You want to keep A-Z characters in a lc()ed string? What about non-ASCII lower case letters?