avoid grepping a string

2002-11-22 Thread Satya_Devarakonda
Hi,

In one of my scripts  I am trying to grep lines from a list that doesn't
have the word HOLD

@temp_str = grep ( {$_ ne /HOLD/}, @temp_str);

Can anybody help me on this.

Satya Devarakonda
IS - EDI
Tufts Health Plan
Tel: 617-923-5587 X 3413
Fax: 617-923-






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: avoid grepping a string

2002-11-22 Thread Tanton Gibbs
I think you want
@temp_str = grep { $_ !~ /HOLD/ }, @temp_str;

or

@temp_str = grep { !/HOLD/ }, @temp_str;

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 1:02 PM
Subject: avoid grepping a string


> Hi,
> 
> In one of my scripts  I am trying to grep lines from a list that doesn't
> have the word HOLD
> 
> @temp_str = grep ( {$_ ne /HOLD/}, @temp_str);
> 
> Can anybody help me on this.
> 
> Satya Devarakonda
> IS - EDI
> Tufts Health Plan
> Tel: 617-923-5587 X 3413
> Fax: 617-923-
> 
> 
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: avoid grepping a string

2002-11-22 Thread Jeff 'japhy' Pinyan
On Nov 22, Tanton Gibbs said:

>@temp_str = grep { $_ !~ /HOLD/ }, @temp_str;
>@temp_str = grep { !/HOLD/ }, @temp_str;

No comma after the block.

  grep BLOCK LIST

or

  grep EXPR, LIST

-- 
Jeff "japhy" Pinyan  [EMAIL PROTECTED]  http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
 what does y/// stand for?   why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]