flacko21stpl
Programmer
- Dec 31, 2005
- 7
im using windows xp pro iis and i wanted to know how to use perl script. at this point i made 2 code. the first one is:
#!c:\perl\bin
print "hello world"
i save it as hello.pl in the dir of c:\perl\site\lib\so what i do is in the command line change the path like this: cd c:\perl\site\lib\www
so now im in the dir then i enter perl hello.pl
and i get back a reply back hello.
but when i made the second code:
#!c:\perl\bin
print "content-type text/html\n\n";
print "<html>";
print "<head>";
print "<title>my first perl</title>";
print "</head>";
print "<body>";
print "your ip adress is: $env{remote_host}";
print "</body>";
print "</html>";
i save this as myip.pl i get a reply back as <html><head>
<title>my first perl</title></head><body>your ip address is:</body></html>
and thats all what do i need to do to see my ip in my browser and where do i save the code, im i saving it in the right place.
#!c:\perl\bin
print "hello world"
i save it as hello.pl in the dir of c:\perl\site\lib\so what i do is in the command line change the path like this: cd c:\perl\site\lib\www
so now im in the dir then i enter perl hello.pl
and i get back a reply back hello.
but when i made the second code:
#!c:\perl\bin
print "content-type text/html\n\n";
print "<html>";
print "<head>";
print "<title>my first perl</title>";
print "</head>";
print "<body>";
print "your ip adress is: $env{remote_host}";
print "</body>";
print "</html>";
i save this as myip.pl i get a reply back as <html><head>
<title>my first perl</title></head><body>your ip address is:</body></html>
and thats all what do i need to do to see my ip in my browser and where do i save the code, im i saving it in the right place.