8

I am working on some packages and for the creation of the final dtx files I use perl. So far it worked from commandline by just calling the script.pl file.

However now I installed texlive 2012 on my laptop and installed my scripts there, but windows (7, 64) does not know how to handle a *.pl file.

How can I use the texlive perl interpreter for this task?

  • on the command line you could just give the full path to the perl.exe program as in <some path>/perl.exe script.pl. The TL perl is not added to the windows system path as it is only a minimal perl installation suited for TL. – daleif Sep 15 '12 at 15:59

2 Answers2

7

See: How do I make my Perl scripts act like normal programs on Windows?.

And I recommend installing a full Perl interpreter: Perl Binaries/Windows, because the Perl of TeX Live does not include all needed modules for the scripts provided by the distribution. For example, File::Which is not included that is needed by purifyeps:

Heiko Oberdiek
  • 271,626
2

If you want your script to work like a normal TeX Live script, here is the way.

  1. Put your script in some location it can be found by kpathsea, eg TEXMFLOCAL\scripts (you may need to create this directory) or some sub-directory. Use kpsewhich -var-value TEXMFLOCAL at a command prompt if you want to check the path of TEXMFLOCAL, which is usually C:\texlive\texmf-local. Don't forget to run mktexlsr afterwards.

  2. Go to C:\texlive\2012\bin\win32 (assuming you installed in C:\texlive\2012) and copy runscript.exe as foo.exe assuming your script is foo.pl.

Et voilà! You can now type foo at a command prompt to run foo.pl.

mpg
  • 9,918