serio:ty01pr00id00ex00
 >E             $cat_line =~ s/(^|[^<\\\"-](?:\\\\)*)\'(?:\\.|[^\\\'])+\'/$1''/g;

            $re = '(?<![\$\\\])\$\"[^\"]+\"';
            if ($line =~ m/(.*)($re)/o) {
                my $count = () = $1 =~ /(^|[^\\])\"/g;
                if ($count % 2 == 0) {
                    output_explanation($display_filename, $orig_line,
                        q<$"foo" should be eval_gettext "foo">);
                }
            }

            foreach my $re (@string_bashisms_keys) {
                my $expl = $string_bashisms{$re};
                if ($line =~ m/($re)/) {
                    $found       = 1;
                    $match       = $1;
                    $explanation = $expl;
                    output_explanation($display_filename, $orig_line,
                        $explanation);
                }
            }

            # We've checked for all the things we still want to notice in
            # double-quoted strings, so now remove those strings as well.
            $line     =~ s/(^|[^\\\'](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g;
            $cat_line =~ s/(^|[^<\\\'-](?:\\\\)*)\"(?:\\.|[^\\\"])+\"/$1""/g;
            foreach my $re (@bashisms_keys) {
                my $expl = $bashisms{$re};
                if ($line =~ m/($re)/) {
                    $found       = 1;
                    $match       = $1;
                    $explanation = $expl;
                    output_explanation($display_filename, $orig_line,
                        $explanation);
                }
            }
            # This check requires the value to be compared, which could
            # be done in the regex itself but requires "use re 'eval'".
            # So it's better done in its own
            if ($line =~ m/$LEADIN((?:exit|return)\s+(\d{3,}))/o && $2 > 255) {
                $explanation = 'exit|return status code greater than 255';
                output_explanation($display_filename, $orig_line,
                    $explanation);
            }

            # Only look for the beginning of a heredoc here, after we've
            # stripped out quoted material, to avoid false positives.
            if ($cat_line
                =~ m/(?:^|[^<])\<\<(\-?)\s*(?:(?!<|'|")((?:[^\s;>|]+(?:(?<=\\)[\s;>|])?)+)|[\'\"](.*?)[\'\"])/
            ) {
                $cat_indented = ($1 && $1 eq '-') ? 1 : 0;
                my $quoted = defined($3);
                $cat_string = $quoted ? $3 : $2;
                unless ($quoted) {
                    # Now strip backslashes. Keep the position of the
                    # last match in a variable, as s/// resets it back
                    # to undef, but we don't want that.
                    my $pos = 0;
                    pos($cat_string) = $pos;
                    while ($cat_string =~ s/\G(.*?)\\/$1/) {
                        # position += length of match + the character
                        # that followed the backslash:
                        $pos += length($1) + 1;
                        pos($cat_string) = $pos;
                    }
                }
                $start_lines{'cat_string'} = $.;
            }
        }
    }

    warn
"error: $display_filename:  Unterminated heredoc found, EOF reached. Wanted: <$cat_string>, opened in line $start_lines{'cat_string'}\n"
      if ($cat_string ne '');
    warn
"error: $display_filename: Unterminated quoted string found, EOF reached. Wanted: <$quote_string>, opened in line $start_lines{'quote_string'}\n"
      if ($quote_string ne '');
    warn "error: $display_filename: EOF reached while on line continuation.\n"
      if ($buffered_line ne '');

    close C;

    if ($mode && !$issues) {
        warn "could not find any possible bashisms in bash script $filename\n";
        $status |= 4;
    }
}

exit $status;

sub output_explanation {
    my ($filename, $line, $explanation) = @_;

    if ($mode) {
        # When examining a bash script, just flag that there are indeed
        # bashisms present
        $issues = 1;
    } else {
        if ($opt_lint) {
            print "$filename:$