|P is for Practical|
Looking for function similer to member() in SKILLby riz (Initiate)
|on Jun 21, 2005 at 08:10 UTC||Need Help??|
riz has asked for the wisdom of the Perl Monks concerning the following question:
Perhaps those who are familier with SKILL language can understand my question well. I am looking for a PERL function which is equalent to SKILL's member().
I have an array lets say @arr = qw/one two three/
and then I am reading a file and get only those lines matching the elements of my array. I want to avoid foreach loop over while <> (as both @arr & file are big). It would be less time consuming if i read the file only once and get the matched lines containing members from @arr.