in reply to Can I print the result to a file

Hi there!
by adding the following code after write;:
select TOP_STDOUT; print;
with select(); you are selecting the default output of print statements
or you can can pass format's into an variable like:
my $format = "format TOP_STDOUT= NAME ID SALARY . format STDOUT= @<<<<<<<< @<<<<<<<<<<<< @<<<<<<<<<<<<<< $name, $id, $salary . write;" print TOP_STDOUT $format;

Hope that helps!

Antonis!