mjgardner, 27 days ago @Serpent7776 use warnings; (or the -w switch for a one-line command) would have helped catch the first problem: https://perldoc.perl.org/warnings You would then see “Argument "foo" isn't numeric in numeric eq (==)” along with the line number in the code and the string you were trying to compare instead of “foo”: https://perldoc.perl.org/perldiag#Argument-%22%25s%22-isn't-numeric%25s If you have 2022’s #Perl version 5.36 or later, use v5.36; will enable warnings as well as other sane defaults. / @perl
@Serpent7776 use warnings; (or the -w switch for a one-line command) would have helped catch the first problem: https://perldoc.perl.org/warnings
use warnings;
You would then see “Argument "foo" isn't numeric in numeric eq (==)” along with the line number in the code and the string you were trying to compare instead of “foo”: https://perldoc.perl.org/perldiag#Argument-%22%25s%22-isn't-numeric%25s
If you have 2022’s #Perl version 5.36 or later, use v5.36; will enable warnings as well as other sane defaults.
use v5.36;
/ @perl