in reply to grep of readline matching more lines than elements in array

This:if (grep ($comp, @isos20)) {

Equates to  if (grep ( "comp1234_c0_seq1", @isos20 )) {

Which isn't a valid way to use grep.

Try: if( grep( /$comp/, @isos20 ) ) {


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: grep of readline matching more lines than elements in array
by bdorsey (Initiate) on Dec 03, 2013 at 19:31 UTC

    Thanks for catching that. I actually had the // construction in my original code. Fixed now in posted code.