Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Incorrectly adding a newline character

by Laurent_R (Parson)
on Oct 08, 2013 at 06:02 UTC ( #1057364=note: print w/ replies, xml ) Need Help??


in reply to Incorrectly adding a newline character

Your address field has a trailing new line character (the end of your input line), you need to remove it with the chomp function. It would be actually be two characters, new line and carriage return, if your file was built under Windows, but chomp will take care of that (the exception being with a mix of 2 OSes, for example if wou created your file under Windows and use it under Unix, in which case a regular expression will be needed).


Comment on Re: Incorrectly adding a newline character

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2014-12-22 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (110 votes), past polls