Have you tried it?
Grep does return the result lines when used in a list context, ie how
you used it
> @inmhs =  grep(/$line/,@mhsArray);
print "$_\n" for (@inmhs);

>From Perldoc:
"Evaluates the BLOCK or EXPR for each element of LIST (locally setting
$_  to each element) and returns the list value consisting of those
elements for which the expression evaluated to true. In scalar
context, returns the number of times the expression was true."

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to