in reply to Sticking output onto the end of your script.

Use Inline::Files:
use Inline::Files; open STDOUT, ">"; print "Hello, world\n";
When you run it, all the output will be below your program:
use Inline::Files; open STDOUT, ">"; print "hello, world\n"; __STDOUT__ hello, world

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.