HP3000-L Archives

March 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jim Alton <[log in to unmask]>
Reply To:
Jim Alton <[log in to unmask]>
Date:
Thu, 26 Mar 1998 15:27:25 -0500
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (28 lines)
On Thu, 26 Mar 1998, Jeff Mikolai wrote:

> Can someone give me a simple example of a perl script.
>
> I am experimenting with Apache and Perl and want to pass a variable from the
> URL.

 Try this one out... you will need to alter the path to perl to suit your
system.


#!/usr/bin/perl
print "Content-type: text/html\n\n";

while (($key, $val) = each %ENV) {
        print "$key = $val<BR>\n";
}

print "Remote Address = $ENV{'REMOTE_ADDR'}\n";


Jim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
James R. Alton                        phone: (905) 575-2281
Systems Analyst                         Fax: (905) 575-2302
Mohawk College                       mailto:[log in to unmask]
Hamilton, Ontario  Canada

ATOM RSS1 RSS2