[ic] Search within embedded perl

Stewart Barnett stewbarnett at wsac.com
Thu Jul 8 14:54:45 EDT 2004

>>In reading through the manual I find reference to using, or not using as 
>>the case may
>>be, the loop tag within embedded perl.
>>It states:
>>NOTE: This would not usually be used with embedded Perl -- a better
>>choice would normally be:
>>for(@list) { CODE }
>>But suppose I wanted to replicate the following within embedded perl:
>>[loop search="
>>se=[default country US]
>>How would this be structured or how would I call the search without the 
>>loop tag?

>At 08:35 AM 7/2/2004, Ed wrote:
>The $DbSearch Perl object would allow you to do this - see the Template 
>Docs:5.2 for more info.

The example shown is for a DB, it doesn't really give a clue as to how to search foo.txt
If I add
  mv_searchfile => 'foo.txt'     
an error shows up in the error.log that states: 
search error: search file 'foo' is not a valid database reference.

I tried to take a different angle and use the query tag which also states that it can be 
used with text files, yet there is no documentation on how to do this either.

Does anybody have either of these functions working on a text file?

More information about the interchange-users mailing list