in reply to problem with strict in perl 5.6 and asp

Ok, new tack.

Are you using the <%@ PerlScript%> syntax or the <SCRIPT LANGUAGE="PerlScript" RUNAT=Server> syntax to embed PerlScript?

Or better still... how does the following example script work for you?

<%@ LANGUAGE="VBScript" %> <HTML> <HEAD> <% Sub InlineSub %> This text won't be displayed until this subroutine is called.<br +> <% End Sub %> <SCRIPT LANGUAGE="VBScript" RUNAT=SERVER> 'Immediate script (outside a function). Response.Write "This text is displayed last" </SCRIPT> <SCRIPT LANGUAGE="JavaScript" RUNAT=SERVER> function TestJavaScript(str) { Response.Write(str); } </SCRIPT> <SCRIPT LANGUAGE="PerlScript" RUNAT=SERVER> sub TestPerlScript { $Response->Write($_[0]); } </SCRIPT> </HEAD> <BODY BGCOLOR=#FFFFFF> <% Response.Write "This is VBScript<br>" TestJavaScript "This is JavaScript<br>" TestPerlScript "This is PerlScript<br>" InlineSub %> </BODY> </HTML>
If that doesn't work as-is, I'd say you've an installation issue.

-David

Replies are listed 'Best First'.
Re^2: problem with strict in perl 5.6 and asp
by grashoper (Monk) on Nov 05, 2007 at 15:57 UTC
    That script works fine. I can't figure where this "bareword remove" and "bareword cancel" are coming from.
      I have a vague memory that there's something weird about the way PerlScript embeds perl in ASP w.r.t package variables.

      If I remember correctly, sometimes you need to pass $Request, $Application, etc to your subroutines instead of referencing them within the subroutines. I know that sounds crazy, but I seem to remember that solving quite a few issues.

      Update: Aha! I remembered correctly. That link explains how to 'use strict' successfully in PerlScript.

      -David