0

The reason I'm asking this is because after half an hour of failing to figure out what key word or jargon to use I figured it wouldn't hurt to ask here.

What I'm currently doing is getting a perl code to run using the good ol:

perl myPerlScript.pl

To get it to run. What I'd like to do for simplicity of presentation as a prototype would be to figure out how to make a script that I can run as an executable that would effectively be just a replacement of that. I know on Linux/Unix you can make bash scripts, but I'm trying to run this like I would Steam or other executables. Any advice or am I asking for something impossible? Having the command prompt pop up in the background is an option but preferably avoidable.

Also I've been using Cava Packager, but it's so bulky I figured since I'm only using one script there would be an easier way.

A016090
  • 499
  • 1
  • 4
  • 11

1 Answers1

1

This answer shows how to make it so you can simply do

myPerlScript.pl

or even simply

myPerlScript

(Another way of achieving the latter is with the pl2bat tool.)

Community
  • 1
  • 1
ikegami
  • 367,544
  • 15
  • 269
  • 518
  • Thanks! I'm sorry it was a simple answer, but when you don't know what combination of words to use in search engines things can get a bit hard to find. – A016090 May 27 '13 at 18:37
  • Okay so after trying that I found out that didn't quite solve my issue. Perhaps it's because I'm on Windows 8, but the solution instead of working continues to try and open Notepad++ instead of running the program. – A016090 May 27 '13 at 19:05
  • What does `assoc .pl` output? And what does `ftype XXX` output (where `XXX` is what's on the right of `=` in `assoc .pl`'s output)? – ikegami May 27 '13 at 19:13
  • assoc's output is PerlScript like in the example, ftype's output is C:\Perl64\bin\perl.exe. But it turns out that I can get it to work through double-clicking (took some registry modifications) and personally that's all I really need, but your effort is appreciated! – A016090 May 27 '13 at 19:19
  • Wow, can't explain that. (I presume it's actually `C:\Perl64\bin\perl.exe "%1" %*`) – ikegami May 27 '13 at 19:24
  • Yeah sorry, it's actually that but yeah it refuses to work, I at first assumed it was the registry being what it is, but once I was there I just tweaked it so double-clicking would do the job. – A016090 May 27 '13 at 19:31