perlconstant(
VALUE
)

The perlconstant( function encodes text for use as a constant in a Perl program.


Parameters

This function has one parameter:

value – the value to be encoded. This value may be text, in which case it will be properly quoted. Any special characters in the text will be escaped. The value may also be numeric, in which case it is passed thru “as-is”.


Description

This function encodes text for use as a constant in a Perl program. For more information see Quote and Quote Like Operators.

perlconstant("Hello World") ☞  'Hello World'
perlconstant("ab\tc'\n\x99 nip\tuck") ☞  'ab\\tc\'\\n\\x99 nip\\tuck'
perlconstant(3264) ☞ 3264

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.