Johnson, Reginald (GTI) wrote:
> Thanks for the assistance. This is what I ended up doing. The hash is
> much faster and I am getting what I require in my two output files. My
> mhs file has over 26 columns and is over 27,000 lines.
>
> #!/usr/bin/perl
Always
use strict;
use warnings;
and a
;; }
} #end while
close(INFILE);
close(MHSFILE);
close(OUTFILE);
close(OUTFILE2);
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 09, 2008 7:30 PM
To: beginners@perl.org
Subject: Re: not grep
From: "Johnson, Reginald \(GTI\)" &
From: "Johnson, Reginald \(GTI\)" <[EMAIL PROTECTED]>
> In my code I am using grep successfully, but I would also like an
> output file that has the objects that don't match the grep. I am trying
> to capture the $line of my that don't match.
> I am thinking something like if ([EMAIL PROTECTED] =
From: Gunnar Hjalmarsson <[EMAIL PROTECTED]>
> Johnson, Reginald (GTI) wrote:
> > In my code I am using grep successfully,
>
> But rather inefficient. A hash is a better tool to check for existence;
> see the FAQ entry "perldoc -q contained".
>
> > but I would also like an
> > output file that
Johnson, Reginald (GTI) wrote:
In my code I am using grep successfully, but I would also like an
output file that has the objects that don't match the grep. I am trying
to capture the $line of my that don't match.
I am thinking something like if ([EMAIL PROTECTED] =
grep/\b$line\b/i,@mhsArray
Johnson, Reginald (GTI) wrote:
In my code I am using grep successfully,
But rather inefficient. A hash is a better tool to check for existence;
see the FAQ entry "perldoc -q contained".
but I would also like an
output file that has the objects that don't match the grep.
while (