in reply to Re: Perl oddities
in thread Perl oddities
You aren't subtracting from a left squiggly when you put a minus in front of it either. It's not that + in this expression is special cased. Unary + in Perl is a noop. (Just like unary plus is a noop when doing arithmetic). In the example you give, putting a plus there is just one of the ways to do disambiguations. Putting parenthesis after shift works as well, as well as something else that's essentially a noop (adding an empty string for instance).
I wouldn't call an idiom a Perl oddity - it's not part of the language itself, just an often used construct.
|
---|
In Section
Meditations