This also works:
$perl -wle " print - -foo " +foo
The space between the two minus signs is significant; otherwise Perl thinks you're trying to decrement a constant.
Also:
$perl -wle " print -+-foo " +foo $perl -wle " print +-+-foo " +foo $perl -wle " print -+-+-foo " -foo $perl -wle " print +-+-+-foo " -foo $perl -wle " print -+-+-+-foo " +foo $perl -wle " print +-+-+-+-foo " +foo
...etc
In reply to Re^6: Why is this auto-quoted? (-(-foo))
by tobyink
in thread Why is this auto-quoted?
by nbtrap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |