... you can use a scalar de-ref/ref:print "year is ${\((localtime)[5]+1900)}!\n";
True, but I've finally managed to get this mechanism excised from the FAQ because it is messy-looking and confusing.
Many people looking at the that code (including the authors of early versions of the FAQ) would expect the expression to be evaluated in a scalar context. It is not. The expression in \(EXPR) is evaluated in a list context. Not, of course, that this makes any difference for the + operator.
In reply to Re^4: Questions about context
by nobull
in thread Questions about context
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |