This is the code:
use 5.010;
use strict;
use warnings;
use Data::Dumper;
use Config;
my @list = ("housekeeper" =~ /keeper/,
"housekeeper" =~ /^keeper/,
"housekeeper" =~ /keeper$/,
"housekeeper\n" =~ /keeper$/);
say "list";
say scalar(@list);
print Dumper(@list);
foreach(@list) {
say;
}
my @other_list = (1 == 1, 1 == 0, 0 == 0, 1 != 0);
say "other_list";
say scalar(@other_list);
print Dumper(@other_list);
foreach(@other_list) {
say;
}
I was expecting 4 "boolean" values in the @list array. But apparently it only has 3 elements, all truthy ones. The @other_list has 4 elements as I was expecting. What am I missing here?
I've got the same results on windows (strawberry-perl-5.28.0.1-64bit-portable) and linux (5.018002)
Thanks!