in reply to This is odd.

The behavior is the correct one if you supress the warnings flag:
p2@nereida:~/src/perl/testing$ cat precedence1.pl my $n1 = 2; my $n2 = 4; print "$n1 plus $n2 is " . $n1 + $n2 . "\n";
When you run this program there are no warnings:
pp2@nereida:~/src/perl/testing$ perl precedence1.pl 6
However:
pp2@nereida:~/src/perl/testing$ cat precedence2.pl use warnings; my $n1 =2; my $n2 = 4; print "$n1 plus $n2 is " . $n1 + $n2 . "\n";
Issues the warning:
pp2@nereida:~/src/perl/testing$ perl precedence2.pl Argument "2 plus 4 is 2" isn't numeric in addition (+) at precedence2. +pl line 6. 6
The warning flag and the Warnings module are full of heuristics that helps you most of the time.

Whenever you have problems with operator priorities use the p option of Deparse like this:

pp2@nereida:~/src/perl/testing$ perl -MO=Deparse,-p precedence2.pl use warnings; use strict 'refs'; (my $n1 = 2); (my $n2 = 4); print(((("$n1 plus $n2 is " . $n1) + $n2) . "\n")); precedence2.pl syntax OK
It will tell you the execution order of the involved operations.

Observe that the extraordinary thing is that the operation

(((("$n1 plus $n2 is " . $n1) + $n2) . "\n"))
still gives 6!. This is because the phrase starts with 4 plus .... There is some irony here.

The first time I stomped in this sort of "Perl priority problems" I was puzzled. But if you live with it time enough you start to appreciate the fun of it

Hope it helps

Casiano