Papo Napolitano wrote: > > > I have a textarea on a webpage that gets stored in a database. I'd like > > to convert the newline to an HTML <br> before it gets stored so when > > I display it, the line breaks as it was typed. I've been looking around > > but haven't found an example. > > > > $text =~ s/\r\n/<br>/g; > > > > doesn't work. > > > > --charlie > > $text =~ s/\r\n/<br>/gs;
The /s option only effects the behavior of the . metacharacter which isn't used in that regular expression. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>