gutterbids -
Joined: 29 Jul 2003 Posts: 1
|
Posted: Tue Jul 29, 2003 3:12 am Post subject: Help showing perl script? |
|
|
Hello,
I downloaded Abyss Web server and installed it to
C:\Program Files\Abyss Web Server
and it appears to be running fine, I also downloaded Active perl 5.6.1 Build 635 and installed it to
C:\Perl
I did the setup as required but tried to run a script that more or less give the paths and it directed it to the proper path but more or less Printed out the script rather than running it, I'm not sure if my path is incorrect set on it or not, but below is the script , any help would be appreciated.
Code: | #!/usr/bin/perl
#!perl
#!/usr/bin/perl5
#!/usr/local/bin/perl
#!/usr/local/bin/perl5
#-###############################################################
# envtest Environment Variables Display
my $sendmail =`whereis sendmail`;
my $plocation =`whereis perl`;
my @perlloc = split(" ",$plocation);
my @mailloc = split(" ",$sendmail);
my $font = '<FONT FACE="Verdana, sans serif" SIZE=2>';
print "Content-type: text/html\n\n";
print qq~<HTML>
<body bgcolor="#FFFFFF" ALINK="#FDB900" LINK="#BF0425" VLINK="#1200FD">
<br><P>
<br><P>
<CENTER><TABLE BGCOLOR=#96A8C3 BORDER=0 WIDTH=95% CELLPADDING=2>
<TR><TH>$font<FONT SIZE=4>Server Program Paths</FONT></TD></TR></TABLE></CENTER>
<P>
<CENTER><TABLE BORDER=1 WIDTH=95% CELLPADDING=2>
<TR><TD WIDTH=35%>${font}<B>Perl Executable:</B></TD>
<TD WIDTH=65%>${font}$^X</TD></TR>
<TR><TD>${font}<B>Perl Version:</B></TD>
<TD>${font}$]</TD></TR>
<TR><TD>${font}<B>PERL compile version OS:</B></TD>
<TD>${font}$^O</TD></TR>
<TR><TD>${font}<B>GID</B>: <FONT SIZE=1>(If not blank, you are on a machine that supports membership in multiple groups simultaneously)</FONT></TD> <TD>${font}$<</TD></TR>
<TR><TD VALIGN=TOP>${font}<B>Location of Perl:</B></TD>
<TD>${font}~;
foreach $loc(@perlloc){
print "$loc<BR>\n";
}
print qq~</TD></TR>
<TR><TD VALIGN=TOP>${font}<B>Location of Sendmail:</B></TD>
<TD>${font}~;
foreach $ml(@mailloc){
print "$ml<BR>\n";
}
print qq~</TD></TR>
<TR><TD VALIGN=TOP>${font} <B>Directory locations searched for perl executables</B></TD><TD>$font~;
foreach $item(@INC){
print "$item <BR>\n";
}
print qq~</TD></TR>
</TABLE></CENTER>
<P>
<CENTER><TABLE BGCOLOR=#96A8C3 BORDER=0 WIDTH=95% CELLPADDING=2>
<TR><TH>$font<FONT SIZE=4>Environment Variables</FONT></TD></TR>
</TABLE></CENTER>
<P>
<CENTER><TABLE ALIGN=CENTER BORDER=1 WIDTH=95% CELLPADDING=2>~;
foreach $fieldname(keys %ENV){
print qq~<TR><TD WIDTH=35%><B>${font}$fieldname</B></TD>
<TD WIDTH=65%>${font}$ENV{$fieldname}</TD></TR>~;
}
print qq~</TABLE></CENTER>
<br><P>
<br><P>
</BODY></HTML>~; |
|
|