- or download this
$ perl -wMstrict -n
my $line = $_ if /\bWood\b/;
...
__END__
Hello, Wood World
Foobar
- or download this
Use of uninitialized value $line in scalar chomp at - line 2, <> line
+2.
BANG!
- or download this
while (<$fh>) {
chomp;
next unless /\bWood\b/;
...
}