in reply to Perl 5.36 warns for magic comparison
You don't show enough for us to answer. I tried the following in two different versions of Perl (one of them older and one newer than 5.36).
I saved the following script as 2.pl:
#!/usr/bin/perl use strict; use feature qw{ say }; use warnings; my $x = 10; for my $i (1 .. 10) { $x += $i; }
I then ran
using both the Perl versions.perl -d 2.pl
5.26.1:
DB<1> @lines=@{"_<2.pl"} ; for my $i (0 .. $#lines) { CORE::say $lin +es[$i] == 0 } 1 1 1 1
5.39.4 (blead):
DB<1> @lines=@{"_<2.pl"} ; for my $i (0 .. $#lines) { CORE::say $lin +es[$i] == 0 } 1 1 1 1 1 1 1
The output is different, but there's no warning.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl 5.36 warns for magic comparison
by ikegami (Patriarch) on Oct 15, 2023 at 17:32 UTC |