• 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: Perl syntax
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perl syntax


  • Subject: Re: Perl syntax
  • From: Christopher Nebel <email@hidden>
  • Date: Sun, 15 Jun 2003 09:19:48 -0700

On Saturday, June 14, 2003, at 07:31 AM, John Delacour wrote:

if you're using the routine << do shell script "perl " & path.pl >>, then your script must be in path.pl complete with shebang + UNIX line ending.

Try something like this:

set fU to "/tmp/temp.pl"
set f to fU as POSIX file
set shebang to "#!/usr/bin/perl" & (ASCII character 10)
set _script to shebang & "use IMDB;
..."
do shell script "perl " & fU

If you call perl directly, the shebang is not necessary, though it is still examined for additional switches. It's important that there be a \n at the end of any comment line (such as the shebang), but otherwise it doesn't matter (as you accidentally demonstrated).


--Chris Nebel
Apple Development Tools
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Perl syntax
      • From: John Delacour <email@hidden>
References: 
 >Re: Perl syntax (From: John Delacour <email@hidden>)

  • Prev by Date: Re: GUI Script Printing Problem
  • Next by Date: how to make 'mail' send
  • Previous by thread: Re: Perl syntax
  • Next by thread: Re: Perl syntax
  • Index(es):
    • Date
    • Thread