• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Calling Perl from AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Calling Perl from AppleScript (From: debt <email@hidden>)

  • Prev by Date: Re: Conversion of ISO Date String to AppleScript Date
  • Next by Date: Re: AppleScript Versions per Iteration of OSX?
  • Previous by thread: Re: Calling Perl from AppleScript
  • Next by thread: Re: Calling Perl from AppleScript (Thomas Fischer)
  • Index(es):
    • Date
    • Thread