#!/usr/bin/perl -w use URI::Escape; use HTML::Entities; use CGI qw/:standard/; print "Content-type: text/html\n\n"; my $file; if(param('test')){ my $code = param('test'); $code = uri_unescape($code); $code = encode_entities($code); open STDERR, '>&STDOUT'; open my $fh, '>', \$file; print $fh $code; close $fh; open my $pipe, '-|', "perl -w $file"; close $pipe; close STDERR; } #### sh: -c: line 0: syntax error near unexpected token `;;' sh: -c: line 0: `perl -w print "hi";' #### print "hi"; print "hello world\n";