Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

exe for perl

by Anonymous Monk
on Aug 03, 2004 at 19:05 UTC ( #379791=perlquestion: print w/replies, xml ) Need Help??

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

Can I create an exe file, where it could run my script the same way if I(WinXP) type c:/perl script.pl.

I want people to just click on icon.exe an run my script.

I tried using PAR but it wouldn't work.

So could I use a notepad and create an exe file that will run my interpreter on that script??? TQ

Replies are listed 'Best First'.
Re: exe for perl
by ccn (Vicar) on Aug 03, 2004 at 19:15 UTC

    You can easily create *.bat file from your perl script using pl2bat which shipped with ActiveState perl

Re: exe for perl
by gri6507 (Deacon) on Aug 03, 2004 at 19:16 UTC
    You should be able to create a batch file "foo.bat" which would contain
    c:\perl\bin\perl.exe c:\my\path\myscript.pl
Re: exe for perl
by waswas-fng (Curate) on Aug 04, 2004 at 01:50 UTC
    What happened when you tried to PAR (pp) it?

    -Waswas
Re: exe for perl
by gawatkins (Monsignor) on Aug 04, 2004 at 03:07 UTC

    As long as your extensions (.pl) are set to open with the perl executable, you can run a .pl file by clicking on it or a shortcut to it. If this is not set correctly, you can right click on a .pl file, select "Open With", then "Choose Program" to find the Perl executable.



    Thanks,
    GW
      and if you append .pl to the PATHEXT environment variable then you don't need to type the .pl extension.
      PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.pl;
Re: exe for perl
by davidj (Priest) on Aug 03, 2004 at 19:16 UTC
    You might want to take a look at perl2exe.

    davidj

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2022-10-06 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (26 votes). Check out past polls.

    Notices?