in reply to CGI file very odd

Tip. Keep it simple. Try this first:
#! /usr/bin/perl -w use strict; use CGI; my $query = new CGI; print $query->header(); print $query->start_html( -title=> "CGI"); while (my $size = read($cgi->param('file'),my $data,1024)) { print $data; } print $query->end_html;
STDOUT is the default filehandle, so no need to specify it.

Replies are listed 'Best First'.
Re: Re: CGI file very odd
by Anonymous Monk on Jan 30, 2003 at 12:48 UTC
    err thanks Jaap but i copied your code exactly and nothing printed to the screen!! ;-0
      Did you submit a form with an <input type="file" name="file> to it?
        yep ;-) exactly like that, so the html + cgi scripts are definately talking to each other.