# This is from the CGI programming with perl book on page 21 sub url_decode { my $text = shift(); $text =~ tr/\+/ /; $text =~ s/%([a-f0-9][a-f0-9])/chr( hex( $1 ) )/eg; }