http://qs321.pair.com?node_id=1040735


in reply to Confused by '+' syntax in code sample.

The examples in perlfunc demonstrate this syntax quite neatly:

Any function (...) may be used either with or without parentheses around its arguments. (...) If you use parentheses, the simple but occasionally surprising rule is this: It looks like a function, therefore it is a function, and precedence doesn't matter. Otherwise it's a list operator or unary operator, and precedence does matter. Whitespace between the function and left parenthesis doesn't count, so sometimes you need to be careful:

print 1+2+4; # Prints 7. print(1+2) + 4; # Prints 3. print (1+2)+4; # Also prints 3! print +(1+2)+4; # Prints 7. print ((1+2)+4); # Prints 7.