2016年9月17日 星期六

perl operators and precedence


operators
+
-
*
/

precedence
4+2*4
(4+2)*4

notice:  ++ different location different result
print $num1++ . "\n";
result: 10

print $num1;
11

print ++$num2 . "\n";
11



$letter  = "a";
$letter++;
print  "$letter\n";