This is where the Perl compiler becomes your best friend. If you run
perl -MO=Deparse,-p [your script name here], the presedence Perl sees will be printed out. See below for your code example from above, which I stored in hello.pl.
[cmilfo@cmilfo monks]$ perl -MO=Deparse,-p hello.pl
($nice = 0);
sub hello1 {
(($nice or return('Hi')) or return('Get Lost!'));
}
sub hello2 {
(((!$nice) || return('Hi')) and return('Get Lost!'));
}
print(hello1(), hello2());
hello.pl syntax OK
It basically puts in all the () and {} that we may not see.
Cheers!
Casey