in reply to Regex on a array

In general, a regex on an array is best done using grep. Makes your code look better. If you keep your newlines intact, you can do the following. Escape the dot (perlre)!
print grep{! /<!DOCTYPE XMLDATA SYSTEM \"artist_royalty\.dtd\">/} @lin +es;
This will do most of your work.

Hope this helps,

Jeroen
"We are not alone"(FZ)

Update $code or die pointed me to stupid omission. Added that damn exclamation mark.

Replies are listed 'Best First'.
Re: Re: Regex on a array
by $code or die (Deacon) on Jan 29, 2001 at 13:06 UTC
    I think that does the opposite.

    Could be wrong, but don't you need:
    print grep{!/<!DOCTYPE XMLDATA SYSTEM \"artist_royalty\.dtd\">/} @line +s;

    $code or die
    Using perl at
    The Spiders Web