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

exe for perl

by Anonymous Monk
on Aug 03, 2004 at 19:05 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-25 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found