Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: output to a single line

by l3nz (Friar)
on Jan 19, 2004 at 09:49 UTC ( [id://322317]=note: print w/replies, xml ) Need Help??


in reply to output to a single line

Everybody has his own pet for this, but I'll go for this solution:
print file "'$var1'=='$var2'\n";
So that you know where your extra \n character is. I guess that if you see the expression on two lines, it should be in $var1, but you should try and see where the expression is broken.

In any case, you'd better be aware that when you read a text file, you also read its embedded \n's, so you'd better chomp the lines before processing them.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-29 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found