Re: Fwd: how to refresh between different pages of the same script
[email protected] ("Jenda Krynicky")
| Newsgroups | perl.beginners.cgi,perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
From: "Pau Marc Munoz Torres" <[email protected]> > #! /usr/bin/perl > #use strict; > use CGI::Ajax; > use CGI; > > my $q = new CGI; > > my $concatter = sub { > > my $buffer = $ENV{'QUERY_STRING'}; > > my @pairs = split( /&/, $buffer ); > > foreach my $pair (@pairs) { > > my ( $name, $value ) = split( /=/, $pair ); > > $name =~ tr/+/ /; > > $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; > > $value =~ tr/+/ /; > > $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; > > $Variables{$name} = $value; > } Do not, repeat, do NOT parse the querystring yourself. Let CGI.pm, CGI::Lite or CGI::Deurl do that for you. Safely. Jenda ===== [email protected] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery