in reply to Re^3: Questions about context
in thread Questions about context
... 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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Questions about context
by ysth (Canon) on Feb 02, 2005 at 06:41 UTC |