[CWB] Question about CWB::CQP::More

Stefan Evert stefanML at collocations.de
Mon Dec 13 18:03:27 CET 2010


On 13 Dec 2010, at 17:20, Scott Sadowsky wrote:

>> my $query_to_send_to_cqp = "[$query_type =
>> ".$cqp->quote($query_item)."]";
> 
> This fails for me, producing a 0 byte output file (but no error message that I can see, and I'm using both "strict" and "warnings" in Perl).

It should work, if you type it in exactly as shown above.  Your code ...

> This is how I tried to incorporate the proper quoting function:
> 
> $query_to_send_to_cqp = "QUERY = [$query_type = \"" . $cqp->quote($query_item) . "\"\%$case_diacr_string];";

... has an extra \" before and after $query_item.  The quote() method already provides the double (or single, if appropriate) quotes around $query_item.

Cheers,
Stefan


More information about the CWB mailing list