This is one of the cases where MO::Deparse can help, by showing how perl interpretes your code:
localtime - $x is actually interpreted as localtime(-$x)perl -MO=Deparse -le 'use Time::Piece; $x = localtime; $y = localtime +- $x; print $y;' BEGIN { $/ = "\n"; $\ = "\n"; } use Time::Piece; $x = main::localtime(); $y = main::localtime(-$x); print $y; -e syntax OK
In reply to Re: Time::Piece, localtime -- ambiguous, parentheses
by Eily
in thread Time::Piece, localtime -- ambiguous, parentheses
by leszekdubiel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |