$ perl -Mdiagnostics -we "print (localtime(time))[2]" print (...) interpreted as function at -e line 1 (#1) (W syntax) You've run afoul of the rule that says that any list operator followed by parentheses turns into a function, with all the list operators arguments found inside the parentheses. See perlop/Terms and List Operators (Leftward).