Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 rifling through the Monastery: (8)
As of 2014-12-27 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls