# my local variable i just created now.
$myLocal = 'done';
#here embedded javascript
print "Content-type:text/html\n\n";
print <<'ending_print_tag';
<html>
<head>
<title>script</title>
<script type="text/javascript" language="JavaScript">
<!--
// well how can i access $myLocal here here?
//thank you for your respond.
Change
print <<'ending_print_tag';
To:
print <<ending_print_tag;
and variables will be interpolated as they are in a double quoted string.
I hope this is answering the correct question...