Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Need to create a pre and post string from a REQUEST_URI

by screamingeagle (Curate)
on Feb 28, 2002 at 04:04 UTC ( #148131=note: print w/ replies, xml ) Need Help??


in reply to Need to create a pre and post string from a REQUEST_URI

something like this might also work:

my %FORM = (); my @QUERYARR = split(/\&/, $ENV{'REQUEST_URI'}); my $i; for $i (0 .. $#QUERYARR) { my ($key,$val) = split(/=/, $QUERYARR[$i]); $val =~ tr/+/ /; $val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; #this t +akes care of all the urlencoded data $FORM{$key} = $val; }
now u can refer to your data as simple hash variables...


Comment on Re: Need to create a pre and post string from a REQUEST_URI
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2015-07-07 06:22 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 (87 votes), past polls