[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: Perl : escape-koder til chars



On Fri, 04 Aug 2006 13:28:44 +0200, Peter wrote:

> Jeg køre et CGI-script i perl, der oversætter escape-koder
> fra en browser (http) til chars. Scriptet er vist forneden,
> men kan det ikke gøres mere elegant ? Og findes der et perl-modul,
> der kan gøre det ?

URI::Escape er din ven.

> sub correct_input {
>   local ($mystr) = @_;
>   $mystr =~ s/%0A//g;
>   $mystr =~ s/%0D//g;
>   $mystr =~ s/%20/ /g;

[...]

Ugh - og regulære udtryk - se dokumentationen til uri_unescape i
URI::Escape's pod!


  Mvh.

-- 
 "Subdued flamboyance"                                        Adam Sjøgren
                                                         sslug@sslug


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-09-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *