[Net-z3950] How to put variable names into a Prefix query?

Dave Mitchell davem at fdgroup.com
Fri Jan 31 23:37:00 CET 2003

On Fri, Jan 31, 2003 at 05:16:42PM -0500, Christopher Morgan wrote:
> my $searchterm = "mineral";
> $rs = $conn->search(-prefix => '@or rock @attr 1=21 "$searchterm"');

This ia a basic Perl question, unrelated to anything particular to the
Net::Z3950 module, and so shouldn't be on this list.

But as you've asked, here are some of the many ways to do it:

    '@or rock @attr 1=21 "' . $searchterm . '"'
    "@or rock @attr 1=21 \"$searchterm\""
    qq{@or rock @attr 1=21 "$searchterm"}


Any [programming] language that doesn't occasionally surprise the
novice will pay for it by continually surprising the expert.
 - Larry Wall

More information about the Net-z3950 mailing list