in reply to why? returns

The previous responses will probably solve your problem, but in case they don't, here's something else to try. It's possible that you're running with the -l switch enabled, which will automatically print a newline character every time you print something. Check the top of the program for something like #!/usr/bin/perl -l, and remove the -l, if it's there. And make sure whatever is calling your program isn't passing it the -l switch.

-- Mike

--
just,my${.02}