Roll some perl code. Crude, but it works. I leave writing the main() to you.
sub do_pod_check { my ( $path, ) = @_; my $troubles = 0; open( my $handle, $path ) or die "Can not open file: $path: $!\n"; while ( my $line = <$handle> ) { if ( $line =~ /^=\w+/ ) { my $line2 = <$handle>; if ( $line2 && $line2 =~ /\S/ ) { $line2 =~ s/^\s+//; $line =~ s/\s+$//; #superchomp lines $line2 =~ s/\s+$//; print "$path\[$.]: suspect POD: /", substr($line,0,30), "/", substr($line2,0,30), "/", "\n"; $troubles++; } } } return $troubles; }