Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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...

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 fog begins to lift...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2016-12-05 17:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (89 votes). Check out past polls.