Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create drag-and-drop Strawberry Perl programs?

I've got a Strawberry Perl program that accepts a single-file as a command-line argument. How can I set things up such that I can drag and drop the desired file onto the Strawberry Perl program (or a wrapper around it) and the program runs with that file's name as an argument?

like image 737
skiphoppy Avatar asked Apr 01 '09 14:04

skiphoppy


People also ask

How do I run a program in Strawberry Perl?

The first is to create a batch version of the program with pl2bat, which will execute perl with the program. Installed programs usually do this automatically because MakeMaker and Module::Build take care of this. That way, you can call programs just by naming them with the . pl extension.

How do I run a perl script from Notepad ++?

You can write your scripts inside of Notepad++, but to run, it needs to call the external perl instance. Like the PythonScript or LuaScript plugins, this module is able to automate actions in the Notepad++ GUI, and access and modify the contents of the open files inside Notepad++.

How do I open a perl project?

Just open a command prompt (in Windows, just type cmd in the run dialog and press Enter. If you're on a Mac or on Linux, open a terminal window). and press Enter. If Perl is installed, you receive a message indicating its version.


1 Answers

Under Windows (tested with XP), you can create a .cmd file and simply have it run the Perl program with the argument of %1 to pass the filename over, as if executed by commandline.

perl c:\test.pl %1

Then you can simply drag and drop a file onto the .cmd file to execute.

like image 146
Frakkle Avatar answered Sep 17 '22 06:09

Frakkle