Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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 taking refuge in the Monastery: (8)
As of 2016-10-24 11:54 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (305 votes). Check out past polls.