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

Re: Is it possible to print out CGI fields using the qq operator?

by chas (Priest)
on Feb 23, 2005 at 02:01 UTC ( #433545=note: print w/replies, xml ) Need Help??


in reply to Is it possible to print out CGI fields using the qq operator?

How about:
use CGI qq(:standard); print qq{ <sometag> @{[textfield(-name=>'cgifield',-size=>'20')]} <sometag> };

(This prints:
<sometag>
<input type="text" name="cgifield" size="20" />
<sometag>

Admittedly, it is still a bit cumbersome...
chas
(I'm a little confused about why the /> instead of >. The code by the hok si la also produces the same thing...) (Updated to fix typos, errors and formatting.)

Replies are listed 'Best First'.
Re^2: Is it possible to print out CGI fields using the qq operator?
by Errto (Vicar) on Feb 23, 2005 at 04:52 UTC
    (I'm a little confused about why the /> instead of >. The code by the hok si la also produces the same thing...)

    That's because GGI.pm's HTML generation methods produce XHTML, rather than HTML 4. They have, in fact, been doing so for a long time, as enthusiastically pointed out by merlyn here.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2021-12-01 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (11 votes). Check out past polls.

    Notices?