Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by extremely (Priest)
on Apr 04, 2002 at 22:05 UTC ( [id://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)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-03-19 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found