http://qs321.pair.com?node_id=814709


in reply to command line tools

This really doesn't seem like a Perl question.

An .exe file is a file in a format that Windows knows how to execute by itself. The original source may have been written in any language, but that source has to be compiled, and the .exe is the result of the compilation. It is not intended to be human-readable.

On the other hand, a .pl file is human-readable (well, opinions differ :-) ), and Windows has no idea how to execute it directly. To run it, you have to call perl as a middle-man (or maybe it's done automatically by Windows on the basis of extensions?) to interpret it.

Replies are listed 'Best First'.
Re^2: command line tools
by cdarke (Prior) on Dec 29, 2009 at 10:23 UTC
    maybe it's done automatically by Windows on the basis of extensions?

    It is a common mis-understanding that Windows (the operating system) does this, but it does not. File extension association has to be looked-up in the registry by whatever is launching the executable, i.e. the shell or application - Windows does not do it for us. See Win32::FetchCommand.
    In theory the .exe extension is not fixed and can be changed, as can all the other file extensions. It would confuse the hell out of everyone though.