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 (
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)
{ }
#!/usr/bin/perl
use warn
McCoy"
cc: "Nikola Janceski"
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED]
02/20/2002 04:26 Subject: RE: Grep function inside
On Wed, 20 Feb 2002 [EMAIL PROTECTED] wrote:
> Thank you - it worked. I got my output as expected. But why is '\n'
> considered so bad in perl unlike shell scripting. Why did I not get the
> output with '\n'. Just curious!!!
It's not considered bad, but it can mess up things when you are trying
<[EMAIL PROTECTED]>
02/20/2002 10:02 AM cc: [EMAIL PROTECTED]
Subject: RE
;, "N015\n");
let us know how it goes.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 9:11 AM
To: Nikola Janceski
Cc: [EMAIL PROTECTED]
Subject: RE: Grep function inside a for loop does NOT grep the values.
Thanks guys,
[EMAIL PROTECTED]
cc:
02/19/2002 05:28 PM Subject: RE: Grep function inside
a for loop does NOT grep the
can you give us a snip of what's in
@prv_lst
@txn_log
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 5:18 PM
To: [EMAIL PROTECTED]
Subject: Grep function inside a for loop does NOT grep the values.
Hi,
I am sorry, I mea
Hi,
I am sorry, I meant to say grep does not work inside a for loop.
regards,
Satya
- Forwarded by Satya Devarakonda/THP on 02/19/2002 05:18 PM -
14 matches
Mail list logo