Re: trouble matching words with parentheses using grep

2011-04-10 Thread C.DeRykus
On Apr 9, 1:04 pm, alanhag...@alanhaggai.org (Alan Haggai Alavi) wrote: > > ... > > #!usr/bin/perl > > For increased portability, use the shebang #!/usr/bin/env perl > Hm, portable only in limited situations, risky, and always slower. From: http://www.webmasterkb.com/Uwe/Forum.aspx/perl/3968/

Re: trouble matching words with parentheses using grep

2011-04-09 Thread John W. Krahn
Mariano Loza Coll wrote: Hello everyone, Hello, Here's what I need to do: I need to take each of the words in one List1, search for their presence (or not) in a second List2 and make a new list with all the words in both. These are lists of gene names, which can often include numbers and symb

Re: trouble matching words with parentheses using grep

2011-04-09 Thread Alan Haggai Alavi
Hello Mariano, use List::MoreUtils qw( any each_array ); I was experimenting and forgot to take off `each_array` from the import list. `each_array` is not used in the alternative solution and is hence not required. Regards, Alan Haggai Alavi. -- The difference makes the difference -- To uns

Re: trouble matching words with parentheses using grep

2011-04-09 Thread Alan Haggai Alavi
Hello Mariano, I realize that there may be a number of ways to do what I need to do (most of them better, I bet), and I'd love to learn about them. But now I'm mostly curious about why grep// cannot "see" words with parentheses in either (or both lists). I suspect the trick may be somehow escapi

trouble matching words with parentheses using grep

2011-04-09 Thread Mariano Loza Coll
Hello everyone, Here's what I need to do: I need to take each of the words in one List1, search for their presence (or not) in a second List2 and make a new list with all the words in both. These are lists of gene names, which can often include numbers and symbols in addition to letters. The very