Re: Do Perl Script?
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.