chomp( my $pat = ); my $re = qr/$pat/; while () { print if /$re/; } __DATA__ (?-xism:(?NAS\-IP\-Address\=)) ...