in reply to Re^2: Looking for syntactic shortcut
in thread Looking for syntactic shortcut
perl -e 'print $a=(localtime())[5]' 105
Update: Or, following BrowserUK:
perl -e 'print +(localtime())[5]' 105
Update: But not (in response to socketdave):
It seems we are hitting the finer points in the parser here...perl -e 'print (localtime())[5]' syntax error at -e line 1, near ")[" Execution of -e aborted due to compilation errors.
|
|---|