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

[MacPerl] Applescript and MacPerl



I'm having trouble getting MacPerl variables into my applescripts.  I've
never worked with this aspect of MacPerl before, so perhaps I'm just being
dopey.

Here's what I've tried:

#!/usr/local/bin/perl

$x = "Text text";

&MacPerl'DoAppleScript(<<'END_SCRIPT');
tell application "MacPerl"
        make new Window
        copy "$x" & "Inserting text the hard way." to character 1 of front Window
end tell
END_SCRIPT

This gives me "$x" instead of "Text text".

variations on this theme (taking the quotes out, etc.) seem to prevent the
script from compiling properly. (I get no error message, but I get no
output either).

Can somebody help me?

I'm using MacPerl 5.1.0r2.