in reply to File Writing and newline

"perldoc -f print"

indicates that the output record separator $\ is printed at the end of each list. I suspect that the output record separator "$\" has somehow gotten set to "\n" rather than a null value.

At the start of the subroutine, try:

$\ = "";

to reset the output record separator and see if it does the trick.

Replies are listed 'Best First'.
Re: Re: File Writing and newline
by particle (Vicar) on Feb 06, 2002 at 18:10 UTC
    local $\=''; would be much safer, as it make sure the variable returns to it's previous state when it goes out of scope.

    ~Particle