in reply to Output split over two lines

As long as your at the command line ( a good place to start IMHO), fire your perl script off using the built in debugger...  perl -d (your_program.pl).

It gives you a quick an dirty way of seeing what you are getting without having to glop your program up with print statements. The debugger is very easy to use, even if you only know a couple of things about it. You can find out how to use it pretty quick here -> perldebug

You will hear some snear and some chuckle about using a debugger, but it is a darn handy tool for learning about what is happening in your code... .

Good Luck!

...the majority is always wrong, and always the last to know about it...