http://www.perlmonks.org?node_id=193689


in reply to Need to use Javascript function in Code

try the window.open function (e.g. add this between the <HEAD> and the </HEAD> tags):
my $code = <<EOF; <script language=javascript> var newwin = window.open('output.html' , 'Windowname', 'location=0,me +nubar=0,resizable=1,height=350,width=500,innerHeight=350,innerWidth=5 +00,scrollbars=1,toolbar=0,titlebar=0'); newwin.focus(); </script> EOF ; print $code;