in reply to Cgi params as binary data
!/usr/bin/perl use warnings; use Carp; use CGI qw(param); use CGI::Carp::DebugScreen; open( OUT, '>>/root/Desktop/zip.out' ); CGI::Carp::DebugScreen->debug(1); my $q = CGI->new; binmode OUT, ':raw'; my $name = $q->param('content_of_zip') || "Content"; my $out = $q->param('output') || "Binary"; $q->save(OUT); close OUT; # now double-check to see if it was saved. open( IN, '/root/Desktop/zip.out' ); while ( not eof IN ) { $q = CGI->new; print $name, "\n", $out, "\n"; exit 0; } close IN;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Cgi params as binary data
by Anonymous Monk on Jun 05, 2011 at 09:22 UTC | |
by atey1 (Initiate) on Jun 05, 2011 at 12:46 UTC | |
by Anonymous Monk on Jun 05, 2011 at 14:54 UTC |