[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Environment variables



At 11.30 98.01.30, Shyam Hegde wrote:
>1. When envoking a MacPerl program from an AppleScript using the Do Script
>function, which MacPerl variable can be used to access the parameters
>passed to the script from the env property?  Is it $ENV or @ARGV??


tell application "MacPerl"
    Do Script "
foreach (keys %ENV) {
  $x .= sprintf(\"%s => %s\\n\", $_, $ENV{$_});
}
MacPerl::Reply($x);
" environment "a=b"
end tell

Hm.  This prints "a => b=".  AND, I cannot figure out how to send more than
one environment variable pair.

>2. To pass variables back to AppleScript, do you use the 'return' statement
>from within MacPerl??

See above.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==       New Book: MacPerl:  Programming for the Rest of Us       ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch