Run Perl from Applescript

Hi,

I am new to Applescript, I have to do add attributes based on the tags in XML file so I wrote the perl script with rule file for user input. I have to know how to run the perl script from Applescript.

I have check the website and found the following code but it is not working. Please check and advise.

on open (droppedItems)

set fileName to quoted form of POSIX path of (item 1 of droppedItems)

tell application "Finder"
	
	set myScriptPath to quoted form of POSIX path of ((container of (path to me)) as alias) & "Test1.app/Contents/Resources/"
	
end tell

(do shell script "perl " & myScriptPath & "cleanTags_pl" & " " & fileName)

end open

Thanks
Satgates

Hi,

try this, I guess the problem was wrong quotation


on open (droppedItems)
	
	set filePath to quoted form of POSIX path of (item 1 of droppedItems)
	tell application "Finder" to set parentFolder to (container of (path to me)) as alias
	set myScriptPath to POSIX path of parentFolder & "Test1.app/Contents/Resources/"
	do shell script "perl " & quoted form of (myScriptPath & "cleanTags_pl") & space & filePath
	
end open