mbcc has asked for the wisdom of the Perl Monks concerning the following question:

I have written multiple applications that run successfully on Apache with Perl on desktops, laptops and tablets. I purchased a small Trio-7.85 PRO-7 tablet with a Windows 8.1 operating system. I installed Apache2.2. Apache is calling Perl. The Perl module was installed with Active Perl-5.12.3.1204-MS Win32-X86-2. The properties for the installed Perl application are Active Perl-5.12.3.1204-MS Win32-X86-294330.msi. For a program that runs successfully elsewhere I am receiving the error "Undefined subroutine &main::param called at (my piping/location and the name of the perl program)" on Perl . Please provide me with information on where to put the required Perl call to get the Perl module running properly.

Replies are listed 'Best First'.
Re: CGI issue
by hippo (Archbishop) on Dec 16, 2022 at 17:26 UTC
    For a program that runs successfully elsewhere I am receiving the error "Undefined subroutine &main::param called at (my piping/location and the name of the perl program)" on Perl

    You have not shown us the source code of this program - that makes it almost impossible to say what is wrong. Best guess is that you have forgotten to include the line:

    use CGI ':standard';

    I'm sure you are aware that your versions of O/S, Apache and Perl are very, very old now. On dedicated hardware there's maybe not much you can do about that but it is likely to cause you more problems that using more recent releases.


    🦛

      An analogy for the OP: Imagine taking your car in to a mechanic, telling them what make it is and what model of spark plugs it has in it, then expecting them to tell you why the check engine light is on solely on that basis . . .

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

Re: CGI issue
by LanX (Saint) on Dec 16, 2022 at 16:50 UTC
    you should check your errors / log files for prior problems and provide more info.

    My guess is you either haven't installed all necessary files or your path settings are wrong, such that the "elsewhere" available code defining the function main::param() is never imported/required/executed.

    update

    on a side note: using apache for that sounds like overkill, many apps allow bundling a built-in webserver. Like some build with the Mojolicious framework.

    Cheers Rolf
    (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
    Wikisyntax for the Monastery

Re: CGI issue
by kcott (Archbishop) on Dec 17, 2022 at 03:56 UTC

    G'day mbcc,

    Welcome to the Monastery.

    You would have seen from other posts that you've provided insufficient information. Please read "How do I post a question effectively?" to find out what you should have included. When you've provided what we need, we'll be more than happy to help. Thankyou.

    — Ken

Re: CGI issue (faq)
by Anonymous Monk on Dec 17, 2022 at 12:21 UTC