December 2011 Archives

Perl droplets for Mac OS X

The editor that came with MacOS Perl (for Mac OS 9 and below) was able to save your script as a droplet -- that is, an application that you could run by dropping files onto it. When your script got control, the paths to the dropped files were in @ARGV

Under Mac OS X you can get this functionality by wrapping your Perl script in an Apple Script. The following example assumes you want to wrap a Perl script named droplet.PL in an application called PerlDroplet. It works because a Mac OS X application bundle is simply a dir…

About Tom Wyant

user-pic Fine Perl code for over 0.005 centuries.