regex problem

DBSMITH_at_OhioHealth.com
Date: 08/09/04


To: beginners@perl.org
Date: Mon, 9 Aug 2004 15:54:06 -0400

All I am getting the error from my if statement:

^* matches null string many times in regex; marked by <-- HERE in m/^* <--
HERE Orig/ at .

I am trying to get everything except *Orig in this output :

*Orig Vol: 1703FBBDED58D4AD (E00117), Seq #: 000114 in TLU: st_9840_acs_0,
media: STK 984e
 Orig Vol: 0303E68522777483 (E00486), Seq #: 000800 in TLU: st_9840_acs_0,
media: STK 984e

07/12/2004 18:13:17 Rotation ID:4A03CC27.A30DEE72.00000200.0E0B8707, 5
backups
     Media duplication is not enabled.

*Orig Vol: 4A03CC27A30DEE72 (E00632), Seq #: 000273 in TLU: st_9840_acs_0,
media: STK 984e

Here is my code:
 
        foreach ($EDM_nonactive_tapelist) {
        if ($EDM_nonactive_tapelist !~ "\^\*Orig") {
                        print $_;
                }
}

*NOTE the variable $EDM_nonactive_tapelist has the Orig strings in it.
Does foreach read line by line?
Do I even need the foreach statement?

thank you!

Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams



Relevant Pages

  • RE: regex problem
    ... : st_9840_acs_0, media: STK 984e ... *NOTE the variable $EDM_nonactive_tapelist has the Orig strings ... In this example we have taken each string and placed it ...
    (perl.beginners)
  • Re: regex problem
    ... > media: STK 984e ... > Do I even need the foreach statement? ... and do a regex on it. ...
    (perl.beginners)