Gossamer Forum
Home : General : Perl Programming :

CGI Error

Quote Reply
CGI Error
Hi Friends..
I am using Active perl 5.6.1.
When I am trying to call the CGI Module I am getting Error.
I tried to write a simle program then also it is giving Error.
I am pasting the same code here.
quote"
#!/usr/bin/perl
use warnings;
use strict;
use CGI;
$q = new CGI;
print $q->header,
$q->start_html( 'Hello Manish!'),
$q->h1('Hello' ),
$q->end_html;
"unqote
I am getting error

"$Id: CGI.pm,v 1.49 2001/02/04 23:08:39 lstein Exp $" is not exported by the Car
p module at C:/Perl/lib/CGI.pm line 21
Can't continue after import errors at C:/Perl/lib/CGI.pm line 21
BEGIN failed--compilation aborted at C:/Perl/lib/CGI.pm line 21.
Compilation failed in require at test.cgi line 4.
BEGIN failed--compilation aborted at test.cgi line 4.
plz help me

Manish
Quote Reply
Re: [mkishore] CGI Error In reply to
the only thing that comes to mind is that you need have:
Code:
my $q = new CGI;
because you are using strict. apart from that, I don't see anything that should be causing any kind of error.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] CGI Error In reply to
I am getting the same error.It's very frusturating to get stuck on these small problems.
Quote Reply
Re: [mkishore] CGI Error In reply to
#!/usr/bin/perl -wT
use warnings;
use strict;
use CGI;
my $q = new CGI;
print $q->header,
$q->start_html( 'Hello Manish!'),
$q->h1('Hello' ),
$q->end_html;

Try this and use chmod 0755 "filename.cgi" and use ./filename.cgi in command prompt.
It works for me