Help for this page

Select Code to Download


  1. or download this
    use File::Temp qw/tempfile/;
    use CGI;
    
    ...
    # ELSE, we're in the child. Run the long-lived command,
    # saving the result in $tempname. Do not attempt to 
    # send any information directly to the browser.
    
  2. or download this
    my $display_id = $q->param('display_id') // my_fatal_error_handler();
    
    # Error if $display_id is undef
    ...
    # to another page/script
    close $fh;
    unlink $display_id;