in reply to Re^2: [5.10] =~ vs ~~
in thread [5.10] =~ vs ~~
Also ~~ is a boolean operator and perlsyn doesn't specify what it should do in list context
but when you add a use Data::Dumper; print Dumper \@a you can see that it does the same thing as =~ in list context.
What's really weird is that say scalar (my @a = ...) behaves differently from my @a = ...; say scalar @a;.
I think the doesn't represent the real matching code remark mostly means that the real matching code is optimized in many cases, but that it should semantically still do the same thing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: [5.10] =~ vs ~~
by Arunbear (Prior) on Sep 01, 2008 at 10:47 UTC | |
by moritz (Cardinal) on Sep 01, 2008 at 11:00 UTC | |
|
Re^4: [5.10] =~ vs ~~
by blazar (Canon) on Sep 01, 2008 at 12:33 UTC |