in reply to Pattern problem

I'd like to know how you've determined /Host System (?!#)/ doesn't work. It should work fine.
while (<FH>) { print if /^Host System (?!#)/; # or perhaps for more whitespace safety # print if /^Host\s+System\s+(?![#\s])/ }

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Replies are listed 'Best First'.
Re^2: Pattern problem
by Anonymous Monk on Jan 27, 2006 at 14:50 UTC
    Hmm this is both embarrasing and interesting at the same time. I've just redone my tests and it does work using
    /Host System (?!#)/
    Most people seem to have suggested that it shouldn't do though based on the previous answers ??

      Nah, they just did the straightforward reply to your OQ "How do I ..." Congrats to japhy for thinking it through.

      Be Appropriate && Follow Your Curiosity