http://qs321.pair.com?node_id=1191387


in reply to How do you run a perl script using a custom perl build from an AppleScript?

Some things I would try (I don't use a Mac so can't test):

1. Spawn bash explicitly (the default shell might not be getting all your environment variables):

# Not sure how quoting should work here, so fix if needed do shell script "bash -c /Users/stevied/bin/clean_desktop.pl"

2. Create a wrapper (e.g., clean_desktop.sh) which force-sets up perlbrew:

#!/bin/bash perlbrew use perl-5.16.0 # or whatever version/folder you are using /Users/stevied/bin/clean_desktop.pl

Then call the wrapper

do shell script "/Users/stevied/bin/clean_desktop.sh"

Good Day,
    Dean