[thelist] Perl Script on Mac

Anthony apwebdesign at yahoo.com
Thu Aug 11 13:43:03 CDT 2005


chmod 755 perltext.cgi, then transfer it with scp.

> #!/usr/bin/perl5.8.1
> print ("Content-type:text/html\n\n");
> print "<HTML><HEAD>";
> print "<TITLE>CGI Test</TITLE>";
> print "</HEAD>";
> print "<BODY><H2>I just wrote a web page using
> Perl!</H2>";
> print "</BODY></HTML>";

I would write it like this:

=======
#!/usr/bin/perl5.8.1

use warning;
use strict;
use CGI;
use CGI::Carp 'fatalsToBrowser';

my $cgi = new CGI;

print $cgi->header();

#use 'here document'
print <<HTML;
<html>
<head>
<title>CGI Test</title>
</head>
<body>
I just wrote a page using Perl!
</body>
</html>
HTML
=======


--- Amjad Majid Ali
<amjad at krumholz.atmos.colostate.edu> wrote:

> Hi folks
> I am running MAc OSX with tiger on it.
> 
> I have written a sample perl script
> http://kiwi.atmos.colostate.edu/test/"perltext.cgi"
> 
> As you can see the Tags are not removed
> 
> I have used BBEDIT and did sftp the script on the
> server
> 
> Here is the script
> 
> #!/usr/bin/perl5.8.1
> print ("Content-type:text/html\n\n");
> print "<HTML><HEAD>";
> print "<TITLE>CGI Test</TITLE>";
> print "</HEAD>";
> print "<BODY><H2>I just wrote a web page using
> Perl!</H2>";
> print "</BODY></HTML>";
> 
> I have even teste on cgi-bin sub dir . But same
> problem
> 
> Any solutions???
> 
> 
> -- 
> 
> * * Please support the community that supports you. 
> * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip
> Harvester 
> and archives of thelist go to:
> http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 


Anthony
ph: (408) 656-2473
blog: http://www.chovy.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the thelist mailing list