I'm trying to do something like this... it seems to work, but I'm
wondering if it'll backfire down the line.

sub run_mode {
    my $cgi_application = shift;
    my $cgi = $cgi_application->query;

    open my $very_huge_file, "<", $filename or die [email protected]
    print $cgi->header("application/octet-stream");
    my $buf;
    while( read $very_huge_file, $buf, 2048 ) {
        print $buf;
    }
    exit 0;
}

-- 
If riding in an airplane is flying, then riding in a boat is swimming.
110 jumps, 45.0 minutes of freefall, 86.2 freefall miles.

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to