Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2016-07-29 14:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (262 votes). Check out past polls.