Re: Using Fly

[email protected] (Nik Gare) Mon, 06 Sep 1999 12:54:46 +0100
Newsgroups perl.riscos
Message-ID <[email protected]>
On 06 Sep, iain truskett <[email protected]> wrote:
> On 6 Sep, you wrote:

> > <big snip> Hi, I'm still going through all the stuff on Fly, I might
> > even understand it eventually! I have another small problem,
> > concerning CGI.pm As I understand, this is in the zip file in the
> > library directory in !Perl. If I have a line such as:
> >
> > my $favourite = param ("flavour");
> >
> > Perl doesn't understand this and says
> >
> > undefined subroutine &main: param called at ...<snip>
> >
> > The param function should be included in CGI.pm (I think), so do I
> > actually need to 'install' CGI.pm somewhere, or am I missing
> > something (probably my brain :-) )

> You *are* putting "use CGI;" at the top of your script, right?

Yep (had to check though!)
The script I tried is:

#!/usr/bin/perl
use CGI;
print "Content-type:text/html\n\n";
print <<end_of_start;
<html>
<head>
<title>Hello me</title>
</head>
<body>
end_of_start

my $favorite = param ("$flavor");
print "hello $flavor";
print <<all_done;
</body>
</html>
all_done

Straight(ish) out of Learning Perl (hence the strange spelling :-) )
I know there is a blindingly obvious reason why the script doesn't work, but
as usual I can't find it!
  
TTFN
Nik

-- 
[email protected]
http://www.cheddarcheese.de