siddheshsawant has asked for the wisdom of the Perl Monks concerning the following question:
Hello everyone !!!!
I have written a simple following script:
#!/usr/bin/perl -w use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); print header; print start_html("Thank You"); my $test_input = 2; my $cmd=`perl -n /tmp/test.pl $test_input > /pptai/nightly_db/api.out` +; my $resdir = "/pptai/nightly_db/api.out"; open RES, $resdir or die "Couldn't open file $resdir: +$!\n"; print end_html;
And the corresponding perl is as follows
#!/usr/bin/perl -w use strict; if($ARGV) { my $input=$ARGV; print "This is number ".$input; }
I am getting an error like this
Software error:
Couldn't open file /pptai/nightly_db/api.out: No such file or directory
Kindly let me know where I am doing mistake....
Thanks in advance .....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: calling perl file subroutine from CGI script
by Corion (Patriarch) on Mar 05, 2010 at 17:40 UTC |