finder003 has asked for the wisdom of the Perl Monks concerning the following question:
Now I have a log file which is parsed for a certain number which I store in a variable $vector. Now if $vector matches any of the elements in @lane01_1 I need to print "1", If it matches the elements in @lane01_2, I need to print "2" and so on and so forth. Whats the best way to do this? Should I push these arrays in to a hash (and whats the easiest way to do that?) or can I do it without using a hash? Thanks!!@lane01_1= (200900..202543); @lane01_2= (202544..204187); @lane01_3= (204188..205831); @lane01_4= (205832..207475); @lane01_5= (207476..210119); @lane01_6= (210120..211763); @lane01_7= (211764..213407); @lane01_8= (213408..215051);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: match with elements in array
by kennethk (Abbot) on May 18, 2010 at 22:15 UTC | |
by finder003 (Initiate) on May 19, 2010 at 21:59 UTC | |
|
Re: match with elements in array
by Marshall (Canon) on May 18, 2010 at 22:49 UTC | |
|
Re: match with elements in array
by choroba (Cardinal) on May 18, 2010 at 22:28 UTC | |
|
Re: match with elements in array
by johngg (Canon) on May 19, 2010 at 12:59 UTC | |
|
Re: match with elements in array
by dineed (Scribe) on May 19, 2010 at 05:55 UTC |