On Wed, Jun 14, 2006 at 09:50:19AM +0530, Nath, Alok (STSD) wrote:
> Hi,
>       Need some help to run this script.

[snip]

>       print q("Please select: ",textfield ("flavour", "mint")) ;

[snip]

>       What I was expecting is a textbox, instead of this string.
>               "Please select: ",textfield ("flavour", "mint")
> 
>       Can anybody point out what is wrong ?

You're quoting a line twice.  The q() syntax is like single-quoting
whatever it contains, so it's roughly equivalent to this:

      print '"Please select: ",textfield ("flavour", "mint")' ;

You need to get rid of the q() so that you're not treating everything it
contains as a nonparsed string.

For more details, see the "Quote and Quote-like Operators" section in
the perlop documentation.

You can also check out a tutorial I wrote at PerlMonks a couple years
ago, titled "quotes in Perl".  I think it's pretty clear and helpful,
but maybe I'm biased:
  http://www.perlmonks.org/?node_id=401006

A perhaps more "intuitive" URL for the PerlMonks tutorial is this:
  http://www.perlmonks.org/?node=quotes+in+Perl

That should help somewhat.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
unix virus: If you're using a unixlike OS, please forward
this to 20 others and erase your system partition.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to