What about:

....
set perlFileCall to perlFile & " " & myStr
set myDate to do shell script perlFileCall
....

or (quoting the args this time ...)

....
set perlFileCall to perlFile & " \"" & myStr & "\""
set myDate to do shell script perlFileCall
....


Does that work? (I don't know if 'do shell script' takes full invocations or
just script names. Can't test it myself at the moment. I'm late to this
thread. So, sorry if I missed a similar earlier reply.)

-B...

> The following five lines occur in a double repeat loop of a
> FileMaker AppleScript which is processing multiple files in multiple
> folders.  These particular lines use a perl script to extract the
> date from the text of each of the files and return it to the variable
> myDate in a form appropriate for FileMaker.
> -------------------------
> tell application "Finder"
> set myStr to read . . . --reads the text file
> write myStr to . . . --writes string to a different (temporary) file
> set myDate to do shell script perlFile
> end tell
> ------------------------
> perlFile is the path to the perl script which reads the
> temporary file and extracts the date string from it thereby returning
> it to myDate.
> 
> It would be much nicer to simply pass myStr directly to the
> perl script for execution without the use of a temporary file, but I
> can't seem to do it.
> 
> This subject was discussed on the MacPerl list quite a while
> ago, but I couldn't make the methods discussed there work.
> 
> Any suggestions much appreciated it.  I am using OS 10.1.2.
> 
> Paul

Reply via email to