$text =~ /Host System (?!#)/ is correct too. However, [^#] is probably faster and an acceptable replacement in this case.
The problem is
if $text =~ /Host System (?!#)/ next;
was used instead of
if ($text =~ /Host System (?!#)/) { next; }
or
next if ($text =~ /Host System (?!#)/);
or
next if $text =~ /Host System (?!#)/;
In reply to Re^2: Pattern problem
by ikegami
in thread Pattern problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |