in reply to Re: MooTools - how to grab file contents?
in thread MooTools - how to grab file contents?

Hi,

Yeah, I've tried it with this too:

my $fh = $cgi->param('File name'); while (<$fh>) { print $_ }


..but that again prints out nothing

Will have another play around with it later today, to see if I can get it working (and will try as you suggested, with a simple HTML form, without the JS code)

Cheers

Andy

Replies are listed 'Best First'.
Re^3: MooTools - how to grab file contents?
by wfsp (Abbot) on Sep 14, 2010 at 09:12 UTC
    Maybe
    use Data::Dumper; print Dumper $cgi;
    might reveal something useful?
      or print $fh, ':',ref $fh;
        Turned out to be a real "school boy" error - I was outputting all the other data to STDERR, but not that bit :) The following works just fine:

        my $handle = $cgi->param('Filedata'); while (<$handle>) { print STDERR $_ }


        Thanks guys :)