Help for this page

Select Code to Download


  1. or download this
    $ perl -we "print (localtime(time))[2]"
    print (...) interpreted as function at -e line 1.
    syntax error at -e line 1, near ")["
    Execution of -e aborted due to compilation errors.
    
  2. or download this
    $ perl -Mdiagnostics -we "print (localtime(time))[2]"
    print (...) interpreted as function at -e line 1 (#1)
    ...
        followed by parentheses turns into a function, with all the list
        operators arguments found inside the parentheses.  See
        perlop/Terms and List Operators (Leftward).
    
  3. or download this
    $ perl -e "print +(localtime(time))[2]"
    16