Dear all, one of my first approaches to Perl aims to be a CGI which should parse an HTML page, compose a filename from the parsed value and download the file. The HTML side loks like this: ---] START [...] <FORM ACTION=http://172.a.b.c/Scripts/checkTice.pl NAME="Form" METHOD="POST"> [...] ---] END And the Perl side like this: ---] START #!/usr/bin/perl use CGI qw(:cgi); $ticeURL="http://www.remote-machine.com/whatever.asp\?idA=28\&idB="; $ticeFileInput=$ARGV[0] ; $ticeFileToCheck=join ("",$ticeURL,$ticeFileInput); $ticeUsage="\nUsage: checkTice.pl <file code>\n"; if (@ARGV < 1 ) { print $ticeUsage ; exit ; } print "\n INFO - Getting => $ticeFileToCheck\n"; system ("wget -cq --execute=http_proxy=proxy:8080 --output-document=TICE_checkpoint $ticeFileInput.xml $ticeFileToCheck"); print "\n INFO - The downloaded file can be found as: TICE_checkpoint_$ticeFileInput.xml\n\n"; ---] END The script used alone works pretty fine but problems arise when I use it as CGI... What obvious part am I overseeing? Thanks in advance, Martin -- Martin Mielke martin@people-com.com http://www.ydilo.com/ People Communications Tel: +34 91 3447028 Pº de la Castellana 216-2pl Systems Department Fax: +34 91 3447059 E-28046 Madrid | Spain [ echo "\$0&\$0">_;chmod +x _;./_ ] -------------------------------------------------------------------------------------- This message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. No confidentiality or privilege is waived or lost by any wrong transmission. If you have received this message in error, please immediately destroy it and kindly notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Opinions, conclusions and other information in this message that do not relate to the official business of People Communications S.A. shall be understood as neither given nor endorsed by it. --------------------------------------------------------------------------------------
On Wed, Sep 05, 2001 at 05:10:15PM +0200, Martin Mielke wrote:
Dear all,
one of my first approaches to Perl aims to be a CGI which should parse an HTML page, compose a filename from the parsed value and download the file.
<!-- Cut -->
The script used alone works pretty fine but problems arise when I use it as CGI...
What obvious part am I overseeing?
The part in your message in which you tell that it works as a stand alone script. It IS a stand alone script and not a CGI script.
Thanks in advance,
Martin
About the disclaimer:
This message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
Nothing about mailing lists.
No confidentiality or privilege is waived or lost by any wrong transmission.
Don't believe it. You make a mistake and then I must react as if nothing happend?
If you have received this message in error, please immediately destroy it and kindly notify the sender by reply email.
Yeah, sure. How can I respond if I first must destroy it?
You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
Why not? What is to stop me?
Opinions, conclusions and other information in this message that do not relate to the official business of People Communications S.A. shall be understood as neither given nor endorsed by it.
Puh. You can send me an email and later tell me that you didn't mean it? Have the people who writes such stuff ever stoped to read it? Regards, Cees. Disclaimer: if you read this, you owe me $50,=. (sorry, could not resist.)
On Wednesday 05 September 2001 22.50, Martin Webster wrote:
On Wednesday 05 September 2001 7:22 pm, Cees van de Griend wrote:
Disclaimer: if you read this, you owe me $50,=.
Now I know why solicitors make so much money!
M
With solicitors, it's more "If I read this, you owe me $750" A
On Wednesday 05 September 2001 3:10 pm, Martin Mielke wrote:
print "\n INFO - Getting => $ticeFileToCheck\n"; system ("wget -cq --execute=http_proxy=proxy:8080 --output-document=TICE_checkpoint $ticeFileInput.xml $ticeFileToCheck"); print "\n INFO - The downloaded file can be found as: TICE_checkpoint_$ticeFileInput.xml\n\n";
---] END
The script used alone works pretty fine but problems arise when I use it as CGI...
What obvious part am I overseeing?
Are you sending the HTTP header: print "Content-type: text/html\n\n"; M
participants (4)
-
Anders Johansson
-
Cees van de Griend
-
Martin Mielke
-
Martin Webster