in reply to Re: Search for complex string, and if it doesn't exist...
in thread Search for complex string, and if it doesn't exist...

Thanks Abigail for the reply. And Oops! Sorry if I was vague. Actually, the "complex strings" I mentioned are these:
"imagdata.zip is ready for transfer"
"ConnectDirect Transfer was initiated"
"Imagdata.zip has been renamed to Imagdata_yyyy-mm-dd.zip"
"Finished pruning D:\IP\29509"
So, I'm trying to search for a condition where the above four lines are _not_ in the log file being searched. I'm trying the "unless" instead of "if" now. Dave
  • Comment on Re: Re: Search for complex string, and if it doesn't exist...

Replies are listed 'Best First'.
Re: Re: Re: Search for complex string, and if it doesn't exist...
by QM (Parson) on Mar 25, 2004 at 19:43 UTC
    So, I'm trying to search for a condition where the above four lines are _not_ in the log file being searched.

    while (<LOGFILE>) { if ( /this|that|the\.other/ ) { print $_; print "The text you didn't want to find was found.\n"; last; } }

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of