Corrected carriage return bug
This commit is contained in:
parent
281a4388e9
commit
4f267ca3ff
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,6 @@ sub generate_header {
|
|||
close FILE;
|
||||
$message .= "0About this gopher server\theader\tlocalhost\t" . $port . "\r\n";
|
||||
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
@ -129,7 +128,7 @@ sub read_entry_file {
|
|||
|
||||
open ENTRY, $entry_file;
|
||||
while (<ENTRY>) {
|
||||
s/\r*\n*//;
|
||||
s/\r*\n*//g;
|
||||
$subject = $1 if (m/^Subject:\s*(.*)$/);
|
||||
$tags = $1 if (m/^Tags:\s*(.*)$/);
|
||||
$date_file = $1 if (m/^Date:\s*(.*)$/);
|
||||
|
@ -145,6 +144,7 @@ sub read_entry_file {
|
|||
sub map_blog_entry {
|
||||
my ($entry_file, $entry_dir) = @_;
|
||||
my $entry_title = read_entry_file($entry_dir . "/" . $entry_file);
|
||||
print "Entry : " . $entry_dir . " + " . $entry_file . " + " . $entry_title . "\n";
|
||||
return "0" . $entry_title . "\t" . $entry_dir . "/" . $entry_file . "\tlocalhost\t" . $port;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue