or download this
You may provide a -target parameter to the header() method:
print $q->header(-target=>'ResultsWindow');
...
...
If a frame of that name doesn't already exist, the browser will pop up
+ a new window and load your script's document into that.
...