Right now I have my perl script to read the log file and then on each line print it out accordingly.
Well, when someone enters news (it is a text box, so it's more than one line in height) they tend to press enter for a new paragraph/etc. When they do this, it will move the log file down, so it will look like this:
Name/News
/Date
Instead of
Name/News/Date
This really screws up the tables and I have to go back and edit it all out. Is there any way to fix it so that when someone presses enter it won't move it down in a log and instead make it a <br> so it won't effect the perl?
These are the parts of the Perl I think you might need:
print OUTF join($SEPARATOR, $handle, $email, $news, $today), "\n";
close (OUTF);
Then:
open(INF, $newsfile)
or errors("Sorry, but their was an error. Please contact the website admin!"
;
my @news = reverse( <INF> );
close INF;
print <<End;
<link rel="stylesheet" type="text/css" href=" <title>news</title>
End
foreach $line (@news) {
($handle,$email,$news,$today) = split(m/$SEPARATOR/, $line);
Well, when someone enters news (it is a text box, so it's more than one line in height) they tend to press enter for a new paragraph/etc. When they do this, it will move the log file down, so it will look like this:
Name/News
/Date
Instead of
Name/News/Date
This really screws up the tables and I have to go back and edit it all out. Is there any way to fix it so that when someone presses enter it won't move it down in a log and instead make it a <br> so it won't effect the perl?
These are the parts of the Perl I think you might need:
print OUTF join($SEPARATOR, $handle, $email, $news, $today), "\n";
close (OUTF);
Then:
open(INF, $newsfile)
or errors("Sorry, but their was an error. Please contact the website admin!"
my @news = reverse( <INF> );
close INF;
print <<End;
<link rel="stylesheet" type="text/css" href=" <title>news</title>
End
foreach $line (@news) {
($handle,$email,$news,$today) = split(m/$SEPARATOR/, $line);