perlscriptstring(
TEXT
)
The perlscriptstring( function converts text into a Perl string literal.
Parameters
This function has one parameter:
text – the original text.
Description
This function converts text into an Perl string literal. To do this, the function surrounds the text with single quote characters, and escapes any single quote and/or backslash characters within the text. (Note: You could also use the applescriptstring( function to create a perl string literal that would be subject to variable substitution.) Use this function when you need a string literal inside the Perl statement or perl( function.
perlscriptstring({Make text into 'perl' "literal string"})
☞ 'Make text into \'perl\' "literal string"'
Note: This function is equivalent to:
{'}+replace(replace(thetext,{\},{\\}),{'},{\'})+{'}
See Also
- applescriptconstant( -- converts an expression into an AppleScript literal.
- applescriptstring( -- converts text into an AppleScript string literal.
- arraytopythonlist( -- converts a panorama array into a Python list.
- loadcustomfunctions -- reloads all ProVUE defined custom functions.
- openanything -- opens a document or application.
- openurl -- opens a URL (usually a web page or to create an e-mail message).
- openwith -- opens a document with a specific application.
- perlconstant( -- encodes text for use as a constant in a Perl program.
- phpconstant( -- encodes text for use as a contant in a php program.
- posixpath( -- converts a path and filename into a POSIX path that can be used as a parameter to a shell command.
- pythonconstant( -- encodes text for use as a constant in a python program.
- registercustomfunction -- defines a new custom function.
- revealinfinder -- reveals a file or folder in the Finder.
- revealmultipleinfinder -- reveals one or more files or folders in the Finder.
- rubyconstant( -- encodes a value for use as a constant in a Ruby program.
- Scripting Panorama X with AppleScript -- embedding Panorama code into AppleScript (allowing Panorama to be controlled from other programs).
- setappleeventvalue -- may be used in a procedure that responds to an AppleEvent (this includes AppleScript programs), the statement specifies the value to be returned by the event.
- unixshellpath( -- converts a path and filename into a POSIX path that can be embedded within the shellscript statement.
- unixshellstring( -- encodes text for use as a parameter to a unix shell command.
History
10.0 | No Change | Carried over from Panorama 6.0. |