mhearse has asked for the wisdom of the Perl Monks concerning the following question:
The above successfully tags a search string in red. However it fails to match any blank or newline. Funny, the HMTL source shows the blank lines. I appreciate any help.my $sql = qq(SELECT * from $status WHERE ticket_id=?); my $sth = $dbh->prepare($sql); $sth->execute($ticket); my $record = $sth->fetch; for (@$record[1..9]) { $_ =~ s/($change)/<font color=red>$1<\/font>/i; $_ =~ s/^\s.*/<br><br>/g; }
2005-03-11 Edited by Arunbear: Changed title from 'Adding HMTL tags to plain text'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Adding HTML tags to plain text
by saintmike (Vicar) on Mar 10, 2005 at 19:06 UTC | |
by mhearse (Chaplain) on Mar 10, 2005 at 21:19 UTC |