In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John Delacour)
wrote:
> $asresult = `osascript -e '$ass'`;
FWIW: this is a bit dangerous, and slow. You would need to make sure the
script did not contain any bad shell characters combined with a wayward '.
A far safer, and much faster (esp. for multiple iterations), solution is to
use MacPerl::DoAppleScript() from Mac::Carbon. I posted benchmarks on this
the other day in "Perl calling AppleScript" thread.
Mac::Glue can do it too pretty easily, if you would prefer to eschew
AppleScript, as some of us do.
use Mac::Glue;
my $mail = new Mac::Glue 'Mail';
my $source = $mail->prop(
source =>
message => $message_index,
mailbox => $mailbox,
account => $account
);
print $source->get;
See the thread on "Mac::Carbon Profiling" for some performance comparisons
between Mac::Glue and AppleScript.
--
Chris Nandor [EMAIL PROTECTED] http://pudge.net/
Open Source Development Network [EMAIL PROTECTED] http://osdn.com/