local $/ = "
"
####
This would be the first line. It's fine and dandy.
Something tends to go wrong about here though.
And of course the next line would be here.
The next line here.
And so on and so on.
####
#!/usr/bin/perl
#
#
use strict;
use warnings;
my $directory = "/path/to/html/files/";
my ($line, $base, $file, $description);
undef $/;
opendir ( DIR, $directory ) or die "Can't open $directory $!";
while ( my $base = readdir( DIR ) ) {
if ( $base =~ /.htm/ ) {
$file = $directory . $base;
open ( FILE, $file ) or die "Can't open $file $!";
my $whole_file = ;
if ( $whole_file =~ /.+?Title:.*?<\/b>*(.*?)
*\s*
\s*(.+?)/ /s;
print "$description\n\n";
}
}
}