open FILE, '<', "test.js"; while () { warn "printing $_"; print $JSWRITE "$_"; } close(FILE); warn "printing END\n"; print $JSWRITE "END\n";