use HTML::HTML5::Builder qw[:standard JQUERY]; open my $fh, '<', 'inline-script.js'; print html( -lang => 'en', head( title('Test'), Meta(-charset => 'utf-8'), ), body( h1('Test'), p('This is a test.'), JQUERY(-version => '1.6.4'), script(-type => 'text/javascript', $fh), ), );