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

Okay, now I am sorry if you get confused in my description... See I have the CPAN Module and Net::IRC which I need to bring my "beng" program into a chat room. Beng is like a D&D bot. I need to know how to run my program. I click on the module and it says something in a perl box so fast you can't say it. Then I click on the net::irc Makefile.PL and it does the same. I am on Windows and most of those files are .pm inwhich it doesn't let me open. Please, I need help can someone give me some info?"

Replies are listed 'Best First'.
Re: Running My Beng
by chromatic (Archbishop) on Oct 29, 2002 at 04:22 UTC
Re: Running My Beng
by Popcorn Dave (Abbot) on Oct 29, 2002 at 06:05 UTC
    First thing I'd do is check out A Guide to Installing Modules or just the Perl Monks Tutorials in general. Even I review the module one since I don't install a lot of modules and have to refresh my memory from time to time.

    There is no emoticon for what I'm feeling now.

Re: Running My Beng
by Molt (Chaplain) on Oct 29, 2002 at 10:52 UTC

    Another useful thing you may try is running the program from a DOS command line, this way any error message will remain up on screen so you can read it.

    It's also worth pointing out why you can't run .pm files. .pl are Perl programs, entirely runnable, but .pm are Perl modules which are 'components' used in other programs, and are not programs in their own right.

Re: installing Net::IRC in Windows
by true (Pilgrim) on Oct 29, 2002 at 23:22 UTC
    This used to drive me absolutely nuts. It also goes outside of the realm of just module installation. Whenever you see a perl script you want to run on windows.
    1. Open your command prompt first (Start>Programs>Accessories>Command Prompt).
    2. Type in the command prompt 'perl '
    3. Drag your perl file onto the Command Prompt window.
    4. Press return
    When you do this, the command prompt window will never close after the perl executes. Then you can run several scripts with perl and no more "oh, my god what did that just say". Also, you check a module for syntax in the Command Prompt too. Yep, try it. type perl theModule.pm. If the module is all good, the Win Command prompt will return with no errors. I tell you this in hopes that you will see that 'perl file.pl' tells windows to use perl to run file.pl. BTW 'c:/Perl/bin/perl c:/file.pl' works the same way.

    P.S.When you drag your file into the Command console, the absolute file path is pasted in, surrounded by quotes. Just make sure you have 'perl ' before you drag or it may not run under perl.

    jtrue
      You can syntax check scripts without running them too - see Option -c in perldoc perlrun.

      Makeshifts last the longest.