Help for this page

Select Code to Download


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