2009/10/25 Majian <jian...@gmail.com>: > I found these : > perl -e'print 01.234 + 01.234', "\n"'
print (01).(234+01).234, "\n"; this evaluates to '1'.'235'.'234' > perl -e'print 01.234 + 011.234' "\n"' I didn't get 1235234, I got 1243234. print (01).(234+011).(234),"\n" evaluates to print '1'.(234+9).'234',"\n"; evaluates to print '1'.'243'.'234',"\n"; > perl -e'print 01.234.12 + 01.234', "\n"' I'll let you work this one out as an exercise. The key point is that you can't have decimal octal numbers, so the . operator is interpreted as the string concatenation operator. Phil -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/