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

Greetings, fellas.

I would like to know what are the differences between the good old .pl and these others: I actually heard that .plx , for an example, have a better performance on win32 scritps than .pl , but it didn't sound like a very serious statement, so...

What do you guys know about these extensions? Is there performances issues about them?

Thanks for sharing your knowledge, brothers.

Er Galvão Abbott
a.k.a. Lobo, DaWolf
Webdeveloper

Replies are listed 'Best First'.
Re: Other Perl extensions
by tachyon (Chancellor) on Mar 16, 2002 at 20:02 UTC

    Essentially a perl script is just a text file and can have any extension you want. By convention .pl and perhaps .cgi are used for scripts and .pm for modules. The .t extension is used to denote perl test scripts, usually found in the /test dir of a module distribution.

    C:\>type larry.wall #!/usr/bin/perl print "Howdy World!\n"; C:\>perl larry.wall Howdy World! C:\>

    On servers the file extension may be used to denote a certain type of file that is to be processed in a certain sort of way so restrictions may apply.

    Have a look here for a good rundown on the use of .plx on M$ IIS. For FMTYEWTKAFE (far more than you ever wanted to know about file extensions) http://filext.com/

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      On servers the file extension may be used to denote a certain type of file that is to be processed in a certain sort of way so restrictions may apply.

      Actually, they're more about benefits than restrictions ...

      .plx - PerlIS (ISAPI)
      Installed with ActivePerl, and runs CGIs via (or is that in cahoots with?) a .dll instead of the perl.exe for improved speed.

      .plex - PerlEx
      Takes things one step further, providing mod_perl-like functionality on WinNT/2K web servers.

          --k.


        Perhaps I should have written ...so restrictions may apply if you want to take advantage of the awesome functionality and robust hacker proof nature of the M$ IIS?

        Just remember to apply all the service packs to fix those pesky issues ;-)

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      To be awfully pedantic the .pl suffix was traditionally used to denote a Perl library prior to the introduction of modules with Perl 5. Some examples (such as ftp.pl) can still be found in the lib directory of a Perl installation - these remain for the support of old code and are not intended to be used in new programs. It might be worth introducing .ph files as well at this point, which are library files derived (using the h2ph utility) from the system's C header files - these are largely obsoleted by the use of XS and there are now no modules (AFAIK) that require their use.

      /J\

      Thank's a lot for the reference, links, tachion.
      I'll take a look.

      Er Galvão Abbott
      a.k.a. Lobo, DaWolf
      Webdeveloper
Re: Other Perl extensions
by erikharrison (Deacon) on Mar 16, 2002 at 19:57 UTC

    That a new extension would suddenly cause a performance increase is, as you rightly guessed, not true, unless the additional extension cause Windows to go through some additional hoops before it feeds the file to perl - not likely.

    I've never seen a .pl*x extension before, but I have seen the .t extension. This is a test file, for testing modules, or the core.

    Cheers,
    Erik

    Update: At tachyon's suggestion, I removed a guess about .pl*x extensions. As was correctly pointed out, if I didn't know, I should've kept my mouth shut.
      Thanks a lot for your reply, Erik.

      It was very instructive.

      Best regards,

      Er Galvão Abbott
      a.k.a. Lobo, DaWolf
      Webdeveloper
Re: Other Perl extensions
by DaWolf (Curate) on Mar 16, 2002 at 20:33 UTC
    Boy oh boy, that's why I love this community.

    I've had just what I was looking for in a matther of minutes!

    Thanks a lot, k and all the others.

    Best regards!

    Er Galvão Abbott
    a.k.a. Lobo, DaWolf
    Webdeveloper
Re: Other Perl extensions
by DaWolf (Curate) on Mar 16, 2002 at 20:42 UTC
    So, when on the wonderful (cough! cough!) win32 enviroment it's best to use PerlEX?

    Did I understood correctly?

    Er Galvão Abbott
    a.k.a. Lobo, DaWolf
    Webdeveloper