Proper shebang line for running perl script with an AppleScript on a perlbrew install?
0
votes
1
answer
343
views
I have the following simple AppleScript which calls a perl script I wrote to clean the desktop:
do shell script "/Users/stevied/bin/clean_desktop.pl"
The script works fine when run from the command line, but when executing the script from my AppleScript, the modules I
use
aren't found and I get this error:
> Can't locate Modern/Perl.pm in @INC (you may need to install the
> Modern::Perl module) (@INC contains:
> /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18
> /Network/Library/Perl/5.18/darwin-thread-multi-2level
> /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2
> /System/Library/Perl/5.18/darwin-thread-multi-2level
> /System/Library/Perl/5.18
> /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
> /System/Library/Perl/Extras/5.18 .) at
> /Users/stevied/bin/clean_desktop.pl line 3. BEGIN failed--compilation
> aborted at /Users/stevied/bin/clean_desktop.pl line 3.
I have perlbrew installed. The current shebang line for the perl script is:
#! /usr/bin/env perl
Asked by StevieD
(1774 rep)
May 27, 2017, 05:12 PM
Last activity: Jan 16, 2019, 09:01 PM
Last activity: Jan 16, 2019, 09:01 PM