Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: How do you replace variables in an external string?

by extremely (Priest)
on Apr 04, 2002 at 22:05 UTC ( #156785=note: print w/ replies, xml ) Need Help??


in reply to Re: How do you replace variables in an external string?
in thread How do you replace variables in an external string?

"For some reason, the CGI.pm author didn't realise that hashes are the most natural way of providing key/value-based information."

Actually, I'm pretty sure Lincoln knew that. I'm also sure that Lincoln wanted the object interface to deal with assignment to the argument set as well as reading it. He tied the hash from Vars later so you could have hash-like access but the first iterations of CGI predate tied hashes.

And, BTW, he also has this note in the man pages:

When using this, the thing you must watch out for are mul­-
tivalued CGI parameters.  Because a hash cannot distin­-
guish between scalar and list context, multivalued parame-­
ters will be returned as a packed string, separated by the
"\0" (null) character.  You must split this packed string
in order to get at the individual values.  This is the
convention introduced long ago by Steve Brenner in his
cgi-lib.pl module for Perl version 4.

--
$you = new YOU;
honk() if $you->love(perl)


Comment on Re: Re: How do you replace variables in an external string?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://156785]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-04-18 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (466 votes), past polls