Help for this page

Select Code to Download


  1. or download this
    my $t = time;
    sub print_t { print("$t\n"); }
    print_t();
    print("$t\n");
    
  2. or download this
    my $script = sub {
    
    ...
    $script->();  # A page request
    sleep(2);
    $script->();  # A page request
    
  3. or download this
    1175021938
    1175021938
    1175021938  <- print_t still references the original $t
    1175021940
    
  4. or download this
    my $script = sub {
    
    ...
    $script->();  # A page request
    sleep(2);
    $script->();  # A page request
    
  5. or download this
    1175022050
    1175022050
    1175022052
    1175022052