in reply to new hash values

Thanks to all who helped me out, nice one-liner indeed !
Off course you noticed its use for cgi :)
to dws: it should be save to asume that following ='s are url-encoded
if so we would need a function call to eg. url_decode() for the value. Hmm, url_decode could take two args change the second and return both, like this:
my %hash = map { url_decode(split /delim/, $_ , 2) } @line;
other ideas ?

Replies are listed 'Best First'.
Re: Re: new hash values
by Chmrr (Vicar) on Dec 05, 2001 at 17:37 UTC
    other ideas ?

    Use CGI.pm (docs) to parse your parameters? It will save you time, effort, pain, sweat, and bugs. Check out Ovid's web programming course (particularly Lesson Two) for tips on how to get started.

    perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^+*`^ ve^#$&V"+@( NO CARRIER'