Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Removing space at end of field and converting to text

by Riales (Hermit)
on Apr 12, 2012 at 23:41 UTC ( #964834=note: print w/replies, xml ) Need Help??

in reply to Removing space at end of field and converting to text

This might work for the first problem:

$field =~ s/(?:\\n)+$/<br\>/;

EDIT: Forgot to note that this only works if your newline characters really are being seen at that point as \\n and not simply \n.

As for your second question, I suspect there may be a CPAN module that could help, but don't know of one specifically...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://964834]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2016-10-20 22:22 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (283 votes). Check out past polls.