in reply to CGI.pm tag attributes and underscores
I found this in perldoc CGI:
Many routines will do something useful with a named argument that it doesn't recognize. For example, you can produce non-standard HTTP header fields by providing them as named arguments: print $q->header(-type => 'text/html', -cost => 'Three smackers', -annoyance_level => 'high', -complaints_to => 'bit bucket'); This will produce the following nonstandard HTTP header: HTTP/1.0 200 OK Cost: Three smackers Annoyance-level: high Complaints-to: bit bucket Content-type: text/html Notice the way that underscores are translated automatically into hyphens. HTML-generating routines perform a different type of translation.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: CGI.pm tag attributes and underscores
by Hero Zzyzzx (Curate) on Dec 16, 2004 at 02:14 UTC |
In Section
Seekers of Perl Wisdom