Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 chilling in the Monastery: (8)
As of 2014-12-25 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls