Полезная информация

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 17.5 The URI ModuleChapter 17
The LWP Library
Next: Reference: uri_unescape


uri_escape uri, [regexp]

Given a URI as the first parameter, returns the equivalent URI with certain characters replaced with % followed by two hexadecimal digits. The first parameter can be a text string, like "http://www.oreilly.com", or an object of type URI::URL. When invoked without a second parameter, uri_escape escapes characters specified by RFC 1738. Otherwise, you can pass in a regular expression (in the context of [ ]) of characters to escape as the second parameter. For example:

$escaped_uri = uri_escape($uri, 'aeiou')
This code escapes all lowercase vowels in $uri and returns the escaped version.

Previous: 17.5 The URI ModulePerl in a NutshellNext: Reference: uri_unescape
17.5 The URI ModuleBook IndexReference: uri_unescape