Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: outputs followed by each other

by 1nickt (Canon)
on Feb 16, 2018 at 00:26 UTC ( [id://1209262]=note: print w/replies, xml ) Need Help??


in reply to outputs followed by each other

Hi, the value of your variables includes the new line character that was added when the user hit 'Enter'.

It's a good idea to examine variable values enclosed in delimiters so you can spot any invisible characters, like this: print ">$var<";

You can remove the newline character with chomp.

Hope this helps!


The way forward always starts with a minimal test.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-26 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found