there is a function called escape() in CGI.pm which you can import. There is
also an unescape function.

use CGI qw(:standard escape);
#                    ^ Import function

$text = "This is a test $£#{}-+";
print "Original text $text\n";

$escaped = escape($text);
print "Escaped text $escaped\n";

HTH

John

-----Original Message-----
From: Lara J. Fabans [mailto:[EMAIL PROTECTED]]
Sent: 27 February 2002 16:57
To: [EMAIL PROTECTED]
Subject: Perl Equiv of URLEncode()


I'm being so braindead today.  This is probably one of the downsides of 
coding in multiple
languages.

What is the perl equivalent of PHP's URLEncode().  It encodes spaces to 
%20, etc.  I was looking
in CGI.pm, but couldn't find anything.  I know that there must be something 
out there.  The HTML::
module?  URI::??

I'm still reading through the stuff on CPAN, but was hoping for a kickstart 
to the brain.

Thank you in advance,
Lara
---------------------
Lara J. Fabans
Lodestone Software, Inc
[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to