Help for this page

Select Code to Download


  1. or download this
    my $flock = 1;    # set to true to flock
    my $timeout = 10; # set to number of seconds before flock timeout
    ...
          DieNice("Can't lock file '$file': $!\n") if ++$count >= $timeout
    +;
       }
    }
    
  2. or download this
    $mode       =~ tr#a-z_##cd;   # untaint that param!
    
  3. or download this
    if ( $mode =~ /^([a-z_]+)_go$/ ) {
        $page   = $1 or die "no page given!";
    
  4. or download this
    open FILE, ">>$file" or die "Can't append to $file, Perl says $!\n";
    
  5. or download this
    sub main {
    
    ...
    
      $draw->html_end();
    }
    
  6. or download this
    sub main {
    
    ...
        }
        $draw->html_end();
    }
    
  7. or download this
    sub DieNice {
    
    ...
        $unindent =~ s/^[ \t]+//gm;
      return $unindent;
    }