http://qs321.pair.com?node_id=433545


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.