Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

command line tools

by manishrathi (Beadle)
on Dec 29, 2009 at 07:04 UTC ( #814706=perlquestion: print w/replies, xml ) Need Help??

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

I have some command line tools in TeamSite application. some of these tools have extension as .pl and some have extebsio as .exe. All the .pl files are executable files, then whats the difference between files with .pl and .exe extensions ?
If extension is .exe , then what does that mean ? Does it mean that file is written in different language than perl ? Even if file is written in, say C, then extension should be .c. why does it have extension .exe ?


Replies are listed 'Best First'.
Re: command line tools
by JadeNB (Chaplain) on Dec 29, 2009 at 07:59 UTC

    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.

      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.
Re: command line tools
by Anonymous Monk on Dec 29, 2009 at 07:23 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://814706]
Approved by planetscape
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2020-05-25 18:39 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (146 votes). Check out past polls.