develooper Front page | perl.beginners | Postings from March 2002

A question about strings and hexadecimal numbers of special characters

Thread Next
From:
O. P.
Date:
March 6, 2002 02:45
Subject:
A question about strings and hexadecimal numbers of special characters
Message ID:
F1946UuEhjJ8uT6Ssuo0001e32c@hotmail.com
Hi.

I'm very new to Perl and have a basic question. How can I convert special 
characters contained in a string to hexadesimal numbers. I'm trying to 
access a cgi program but  the string I use with the post method contains 
quote marks, question marks, etc. and the program crashes.

I have:

$string = "it's";

And I need to get:

$string = "it%XXs";

where %XX is the hexadecimal number.


Thank you.

- Oriol -







_________________________________________________________________
MSN Photos es la manera más sencilla de compartir e imprimir sus fotos: 
http://photos.latam.msn.com/Support/WorldWide.aspx


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About