Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: still confused with CGI and carriage returns carriage returns

by guice (Scribe)
on Apr 26, 2000 at 08:10 UTC ( #9167=note: print w/ replies, xml ) Need Help??


in reply to still confused with CGI and carriage returns carriage returns

You may want to use chomp(). chomp() will remove the trailing newlines in any scalar context value it's given. Since you are trying to log people in via a CGI script you don't have to worry about carrage returns (\r) they are Mac (\r) and Windows (\r\n) only. The 'uniform' return characture is the newline (\n). All browsers do at least conform to that .. ;)
Doing a chomp($var) will get rid of that pesky newline ...

Read about $/ to see how you can modify chomp() to 'chomp' off what you want from the end of a line.

-- philip
We put the 'K' in kwality!


Comment on Re: still confused with CGI and carriage returns carriage returns

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-08-20 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (105 votes), past polls