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
'/Users/stevied/perl5/lib/perl5';
but now get a very weird error:dyld: lazy symbol binding failed: Symbol not found: _Perl_xs_handshake Referenced from: /Users/stevied/perl5/lib/perl5/darwin-thread-multi-2level/auto/Mac/SystemDirectory/SystemDirectory.bundle Expected in: flat namespace dyld: Symbol not found: _Perl_xs_handshake Referenced from: /Users/stevied/perl5/lib/perl5/darwin-thread-multi-2level/auto/Mac/SystemDirectory/SystemDirectory.bundle Expected in: flat namespace