Welcome to the Monastery | |
PerlMonks |
Looking for function similer to member() in SKILLby riz (Initiate) |
on Jun 21, 2005 at 08:10 UTC ( [id://468588]=perlquestion: print w/replies, xml ) | Need Help?? |
riz has asked for the wisdom of the Perl Monks concerning the following question:
Hi, 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. Thanks, riz.
Back to
Seekers of Perl Wisdom
|
|