They don't work in ASP.
print doesn't do anything in ASP, you can use it with Win32::ASP but that's basically a wrapper that overloads print to use $Response->write, which then gives me an error since there is no such object. Additionally, %ENV is not created as it would be in a CGI environment. None of the CGI/web related variables are there, only some of the ones you would see if you can the script from a console on a Win2k box. Additionally, posted variables are not fed to STDIN, so there's no way to read them. QUERY_STRING variables don't get put in %ENV, so there's no way for me to read them. Without ASP objects, I'm crippled.
The only documentation I can find uses either Win32::ASP(which I can't use because of the error). However, the <%= $var %> syntax does work, oddly enough. However, without the full fledged power of ASP's objects or perl's functions, I can't do much of anything worthwhile.
Weird phenomenon demonstrated below:
This works:
<%@ Page Language=Perlscript Debug="True" %>
<html>
<head>
</head>
<body>
<%
for $i (1 .. 10) {
%>
<%= $i %><BR>
<% } %>
</body>
</html>
This doesn't:
<%@ Page Language=Perlscript Debug="True" %>
<html>
<head>
</head>
<body>
<%
for $i (1 .. 10) {
$Response->Write("$i<BR>");
} %>
</body>
</html>
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.