I've already told you that when you asked the question in the chat:
Just use variable interpolation (which likely also is available in PHP):
print qq{ <SCRIPT type="text/javascript"> var counter = $counter; </SCRIPT> };
See perlop about "Quotes and Quote-like Operators".
In reply to Re: assigning a parent html (js) variable to a perl (cgi input) variable
by Corion
in thread assigning a parent html (js) variable to a perl (cgi input) variable
by lev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |