Help for this page

Select Code to Download


  1. or download this
    my $start_time = time;
    END { my $exec_time = time - $start_time;
          print("Program took $exec_time seconds to execute\n"); }
    
    ...[ put rest of program here ]...
    
  2. or download this
    my $start_time;
    BEGIN { $start_time = time; }
    ...
            print("Program took $exec_time seconds to execute\n"); }
    
    ...[ put rest of program here ]...