Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: new perl user

by Anonymous Monk
on Mar 10, 2011 at 20:54 UTC ( [id://892527]=note: print w/replies, xml ) Need Help??


in reply to new perl user

Welcome :) Read perlintro

plx is a windows throwback, because windows doesn't use shebang but assoc (C:\> help assoc), and before perl5, there were no modules, so libraries were just .pl files, and perl5 includes some (now unsupported) compatibility libraries

$ perl -e " require 'ctime.pl'; print ctime()" Wed Dec 31 16:00:00 PST 1969
so activestate (who ported perl to win32, then microsoft sponsored them) wanted to distinguish these libraries (non-executable) from programs (executable), so that if you typed pwd.pl (or clicked on pwd.pl), it opened pwd.pl in notepad (or whatever), but if you typed superfly.plx (or clicked it), it executed perl superfly.plx

I also think there was a superfly.plw which executed wperl superfly.plw (wperl is GUI version, non-console)

I don't know if this still survives in activeperl, but I don't think strawberryperl uses it .... you can manage this yourself see C:\> help ftype, it actually shows perl as the example

Replies are listed 'Best First'.
Re^2: new perl user
by bobr (Monk) on Mar 11, 2011 at 11:22 UTC
    Just tested on ActivePerl 5.12 -- it does associate .pl extension to perl, but does not setup anything for .plx.

      Simple. Don't use .plx - it's not conventional. Use .pl for scripts and .pm for modules. In the *nix world drop the .pl (no extension for scripts, but don't forget to use #!/usr/bin/perl as the first line), but carry on using .pm.

      True laziness is hard work
      FWIW, IIRC, .PLX was also adopted as an IIS webserver convention

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://892527]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found