sub story { my ($source,$author) = @_; my $tab = 3; while (my $line = <$source>) { chomp($line); # If a line starts with a bracket, just print the line. if ($line =~ m/^ $id }); } # If a line is a break or horizontal rule, print the line in brackets. elsif ($line =~ /^[bh]r$/) { line($tab,"<$line>"); } # All other lines are paragraphs. else { paragraph($tab,$line); } } # If I wrote a story, I want people to know I wrote it at the bottom. paragraph($tab,"written by $root_user", { class => 'author' }) if !$author; }