M
Matija Papec
1) () stands afaik for "empty list", so why it doesn't pass a map function?
Is such behavior accidental or intentional?
print join ',', map $_%2 ? () : $_, 1..20;
2) how to grok this expression, what exactly perl does here?
my $count = () = $data =~ /match/g;
is this /on the perl side/ same as,
my $count = @{[ $data =~ /match/g ]};
?
Is such behavior accidental or intentional?
print join ',', map $_%2 ? () : $_, 1..20;
2) how to grok this expression, what exactly perl does here?
my $count = () = $data =~ /match/g;
is this /on the perl side/ same as,
my $count = @{[ $data =~ /match/g ]};
?