0

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
2
  • I added the following line to the script: use lib '/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
    – StevieD
    May 27, 2017 at 17:35
  • Please add additional details, modifications or updates to your question (e.g. as addendum, update or post-scriptum) instead of adding comments!
    – klanomath
    May 28, 2017 at 9:53

1 Answer 1

1

See first comment here for answer: http://www.perlmonks.org/?node_id=1191380

1
  • 2
    Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone.
    – nohillside
    May 28, 2017 at 9:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .