[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] sub-search match novice question



Randy,
cc: Bart,
At 1:45 AM 9/5/99, Bart Lateur wrote:
>On Sat, 4 Sep 1999 22:51:28 -0400, Randy M. Zeitman wrote:
>>I'm matching a string to text file of records (rows). Each entry (column)
>>in each record is tab separated (a la spreadsheet).
>>But sometimes I want to only match against columns 2,3,and 4, of all
...
>                if("@field[2,4,7]" =~ /searchterm/) {
...
Note that this form no longer has the tabs to delineate fields in the
searchterm.
If you want the fields still delineated by tabs, use something like

    if(join("\t",@field[2,4,7]) =~ /searchterm/) {

--
Regards, Larry F. Allen-Tonar        (larryat@cts.com) +1 760/746-6464 (voice)
         Principal Designer                              +1 760/746-0766 (FAX,
         P.O. Box 463072                                         upon request)
         Escondido, CA  92046-3072



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org