in reply to Re^3: Replacement and conversion of flat file text documents
in thread Replacement and conversion of flat file text documents

Thanks alex (also my middle name) for getting back to me!

Yes that is what I have to do!

I have this,

#!/usr/bin/perl use English; use diagnostics; print "html body\n"; while ($line = <>) { if ($line =~ m/Emma [[:punct:]]/) { print "h2 $line h2\n"; } if ($line =~ m/CHAPTER (.*)/) { print "h2 $line h2\n"; } if ($line =~ m/Jane Austen/) { print "h2 $line h2\n"; } if ($line =~ m/VOLUME (.*)/) { print "h2 $line h2\n"; } if ( not ( $line =~ m/Jane Austen/) ) { if ( not ( $line =~ m/Emma [[:punct:]]/)) { if ( not ( $line =~ m/CHAPTER (.*)/)) { if ( not ( $line =~ m/VOLUME (.*)/)) { $line =~ s|\b_|<i>|g; $line =~ s|_\b|</i>|g; print $line; } } } } } print "body html\n";
This should do everything but not the paragraph elements! Any guidance would be great! I have left out the "<" brackets so that it will display properly

Edit by tye: Add CODE tags