Note: forwarded message attached.
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
--- Begin Message ---I want to call an application in cgi file, the application runs when i run the cgi file at terminal (which outputs several files), but the application called is not executed in the web browser, since no files are generated.Can anyone help me this issue? The following is my code (the last three lines are called applications not executed under web browser, but executed under terminal command running). Thanks a lot, Justin #!/usr/bin/perl -w use strict 'refs'; use Shell; #use Expect; use lib '..'; use CGI qw(:standard); use CGI::Carp qw/fatalsToBrowser/; #system "gedit /var/www/cgi-bin/file2.pl"; print header(); print start_html("File Upload Example"); #print strong("Version "),$CGI::VERSION,p; print h1("Sequence Generating Page"), br, 'Using Phrep and Phrap', #strong("Main Page: http://picard.mbb.sfu.ca."), br, 'Author:Justin Zhang. Contact: [EMAIL PROTECTED]', p, 'Select the ',cite('browser'),' button to choose a chromatographic file to upload. When you press the ',cite ('Process File'),' button, the sequence will be shown below.'; my @types = ('count lines','count words','count characters'); # Start a multipart form. print start_multipart_form(), "Enter the file to process:", filefield('filename','',45), br, checkbox_group('count',[EMAIL PROTECTED],[EMAIL PROTECTED]), p, reset,submit('submit','Process File'), endform; # Process the form if there is a file name entered if (my $file = param('filename')) { # "phrap $file"; # print $cmd."\n"; my %stats; my $tmpfile=tmpFileName($file); my $mimetype = uploadInfo($file)->{'Content-Type'} || ''; print hr(), h2($file), h3($tmpfile), h4("MIME Type:",em($mimetype)); my($lines,$words,$characters,@words) = (0,0,0,0); while (<$file>) { $lines++; $words += @words=split(/\s+/); $characters += length($_); } close $file; grep($stats{$_}++,param('count')); if (%stats) { print strong("Lines: "),$lines,br if $stats{'count lines'}; print strong("Words: "),$words,br if $stats{'count words'}; print strong("Characters: "),$characters,br if $stats{'count characters'}; } else { print strong("No statistics selected."); } } print hr(), a({href=>"http://picard.mbb.sfu.ca"},"main page"), end_html; system(" perl test1.pl"); system("phrap fasta1"); system("vi test.pl"); __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail
--- End Message ---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>