Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Form Escapes @#%!???

by Anonymous Monk
on Feb 02, 2000 at 07:29 UTC ( #2700=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

When you parse data from a form with multiple returns, how do you get rid of all the returns in a value with multiple returns in it??? I've tried with tr/\n// and tr/\r// with no results. I guess this could be read as what the @#$% is the control character that i need, such as tr/cP// ???????? Thanks!!!

Replies are listed 'Best First'.
Re: Form Escapes @#%!???
by Anonymous Monk on Feb 02, 2000 at 13:27 UTC
    tr works, but... you need to add the /d modifier to delete what it found tr/\r//d tr/\n//d
Re: Form Escapes @#%!???
by Elihu (Novice) on Feb 02, 2000 at 09:53 UTC
    You could replace any of these: \r \n \f with nothing.

    $formVar =~ s/\n|\r|\f//g;
    
      cool, thanks all!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2022-05-21 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (76 votes). Check out past polls.

    Notices?