Abigail <abigail <at> abigail.be> writes: >> % perl -E '@a = ("1"); say "1 x" ~~ @a' >> >> % perl -E '@a = (1); say "1 x" ~~ @a' >> 1 >>This is the only place in everyday Perl programming where the difference is >>noticeable. > >False, unfortunally. > > $ perl -wE 'say 10 | 33' > 43 Ah - I do not use the | operator in everyday programming (in fact, I don't think I have ever used it) so I didn't think of this case. >And it can even be more subtle: > > $ perl -E '$a = $b = "abc100"; 0 + $b; say $a; say $b; > $a ++; $b ++; say $a; say $b' That is a nasty one. Surely the expression 0 + $b should not mutate the value of $b. I'm surprised this is not considered a bug? -- Ed Avis <eda@waniasset.com>Thread Previous | Thread Next