code:<pre style="font-size:x-small; font-family: monospace;">tell application "BBEdit 6.5"
save document of front window
set pathToFile to file of document of front window
end tell
set pathToFile to POSIX path of pathToFile
tell application "Terminal"
do script with command "perl " & pathToFile
end tell</pre>