in reply to printing header method

Yes, it's called "header".
use CGI qw/:standard/; print header; ...
The default content type is text/html, but you can specify a different one if you like:
print header( 'text/plain' );

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.