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

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...


Comment on Re: Removing space at end of field and converting to text
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (21)
As of 2015-07-31 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls