3 ms·
Actually, perl will return an empty list, which if then evaluated in scalar context will return 0, which is boolean false. So if (my ($x, $y) = '12' =~ /(\d)
by mst 15y ago
Actually, perl will return an empty list, which if then evaluated in scalar context will return 0, which is boolean false. So
if (my ($x, $y) = '12' =~ /(\d)(\d)/) {
<use $x and $y here>
}
is the normal idiom.