Re: Calling Perl from AppleScript
Re: Calling Perl from AppleScript
- Subject: Re: Calling Perl from AppleScript
- From: Doug McNutt <email@hidden>
- Date: Mon, 06 Mar 2017 20:23:44 -0500
That ampersand character has a meaning to some shells.
Are you sure you don't mean:
do shell script "perl
~/Desktop/code/AppleScript/test.pl xxx zzz"
On 03/06/2017 12:16 PM, debt wrote:
set xxx to
"1"
set zzz to
"2"
set var_array to xxx
& " " & zzz
do shell script "perl
~/Desktop/code/AppleScript/test.pl " & var_array
——————————————
#!/usr/bin/perl
use strict;
use warnings;
my ($name, $number) =
@ARGV;
$name = 'x' if not
$name;
$number = 'z' if not
$number;
open (my $fh,
'>>', 'test.txt');
print {$fh} "$name\n";
print {$fh} "$number\n";
close $fh;
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden