πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #15775

Newbie met cgi-perl probleem onder linux

#15775
From: Franky Claeys
Date: Tue, 15 Aug 2000 00:00
44 lines
1853 bytes
[This followup was posted to be.comp.programming and a copy was sent to the cited author.]

Hallo


Ik ben een newbie op het vlak van perl en unix-omgevingen maar ik moet 
deze technieken gebruiken voor mijn thesis (studeer handelswetenschappen, 
optie manangement en Informatica).

Ik heb een probleem met het volgende cgi-script:

#!/usr/bin/perl -wT
    use strict;
    use diagnostics;
    use CGI;
    use CGI::Carp qw(fatalsToBrowser);
    # Create an instance of CGI
    my $query = new CGI;
    # Send an appropriate MIME header
    print $query->header(-type =>
    "text/html");
    # Send some content
    print $query->start_html(-title =>
    "This is a test.");
    print "<H1>Testing!</H1>\n";
    print "<P>This is a test.</P>\n";
    print $query->end_html;


Ik heb dit script in de CGI-bin gezet (BTW: ik gebruik redhat 6.1).

Daarna heb ik in mijn HTML-file het betreffende pl-bestand gelinkt.

Wanneer ik nu probeer in Netscape op deze link te klikken dan vraagt de 
browser mij altijd of ik het bestand wil opslaan.

Dit kan natuurlijk niet de bedoeling zijn. Normaal zou de browser bij dit 
eenvoudige script enkel wat HTML moeten terugsturen.

Wat loopt er verkeerd?

Bedankt alvast

Franky
Technical Details
Message-ID: <MPG.140372c85cf9fbaa989683@news.hogent.be>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,1becf34ee0e2ff9a,start
X-Google-Attributes: gidfcea4,public
From: Franky Claeys <franky.claeys@vt4.net>
Subject: Newbie met cgi-perl probleem onder linux
Date: 2000/08/15
Message-ID: <MPG.140372c85cf9fbaa989683@news.hogent.be>
X-Deja-AN: 658538115
Sender: 963017fc@uu212-190-11-86.unknown.uunet.be
X-Trace: mykenos.hogent.be 966349915 11337 212.190.11.86 (15 Aug 2000 14:31:55 GMT)
Organization: privοΏ½
NNTP-Posting-Date: 15 Aug 2000 14:31:55 GMT
Newsgroups: be.comp.programming
X-Complaints-To: newsmaster@hogent.be