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

Re: Do Perl Script?


  • Subject: Re: Do Perl Script?
  • From: John Delacour <email@hidden>
  • Date: Fri, 6 Jun 2003 20:48:18 +0100
  • Mac-eudora-version: 6.0b20

At 9:38 am -0600 6/6/03, Gnarlodious wrote:

Can someone post a "Do shell script (perl)) to get my jumpstarted?

Chris Nebel's perl -e example is fine for the occasional quick script, but you will soon hit insoluble problems. It's best to work with files. Here's a simple example:


set fU to "tmp/test.pl"
set f to fU as POSIX file
set shebang to "#!usr/bin/perl " & (ASCII character 10)
-----
set perl_script to shebang & "
$string = hello;
$string =~ s/e/u/ ;
$string =~ s/.+/\\U$&/ ;
print $string . '!' ;"
-----
open for access f with write permission
set eof f to 0
write perl_script to f
close access f
do shell script "perl " & fU

JD





.
_______________________________________________
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: Do Perl Script?
      • From: Gnarlodious <email@hidden>
    • Re: Do Perl Script?
      • From: Christopher Nebel <email@hidden>
References: 
 >Do Perl Script? (From: Gnarlodious <email@hidden>)

  • Prev by Date: RE: Move File
  • Next by Date: Re: Do Perl Script?
  • Previous by thread: Re: Do Perl Script?
  • Next by thread: Re: Do Perl Script?
  • Index(es):
    • Date
    • Thread