Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: %20 results from reading info from a .dat file

by wog (Curate)
on Jan 13, 2002 at 23:12 UTC ( #138450=note: print w/ replies, xml ) Need Help??


in reply to %20 results from reading info from a .dat file

It looks like you are dealing with URL-encoded data. The URI::Escape module can deal with this:

use URI::Escape; # ... $data = uri_unescape($data);

This should change %20 (in the $data variable) into spaces (assuming you are running on an ASCII-compatible platform), and other %XX sequences into the appropriate character. If you really don't want to use a module you can use the substitution: $data =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg which should be equivilent.


Comment on Re: %20 results from reading info from a .dat file
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://138450]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-07-03 02:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls