This got me curious
$ perl -MO=Deparse -e 'print $q -> start_html(-title => "The Time", -b
+gcolor => "#ffffff") '
print $q->start_html(-'title', 'The Time', -'bgcolor', '#ffffff');
-e syntax OK
$ perl -MO=Deparse -e 'print -"asdf"'
print '-asdf';
-e syntax OK
$ perl -MO=Deparse -e 'print -"1asdf"'
print -1;
-e syntax OK
$ perl -MO=Deparse -e 'print -"-1asdf"'
print '+1asdf';
$ perl -MO=Deparse -e 'print -"+1asdf"'
print '-1asdf';
-e syntax OK
What I glean from this is that if you use unary minus on any non-numish-looking string constant, the minus will get prepended. If you use an undecorated(+/-) numish string constant it gets numified, but if you use a decorated one it inverts the sign and doesn't numify?
Is this accurate?
Is this documented anywhere?
What is the rule on this?
And what is this useful for (beyond use given in the OP)