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

[MacPerl] Do Script and dbm files



I want to send Do Script commands from AppleScript to access key/value 
pairs in a MacPerl dbm file. It appears that I have to explicitly open 
the dbm file each time I want access to it from a Do Script event, as 
in:

tell application "MacPerl"
Do Script "dbmopen(%myArray,"myPath:myFile" 0644);
$result = $myArray{$key};
&MacPerl'Reply($result);
$MacPerl'Open(0);"
set x to the result
end tell

What I want to do is send MacPerl a dbmopen ONCE, then have repeated 
access to it through any number of instances of :

tell application "MacPerl"
Do Script "$result = $myArray{$key};
&MacPerl'Reply($result);"
set x to the result
end tell

Looks like I can't, as the handle to the dbm file appears to exist only 
for the life of the script, not the life of the running MacPerl process. 
Can anyone confirm this for me, or correct me if I am wrong?" 

BTW: Perl5.0.7r1m.

Thanks,

Bill
bhoff@slip.net