WebMaster AIM-US <[EMAIL PROTECTED]> wrote:
>     Another option is to put the JavaScript in the text file, and have Perl 
>     read from that file, and print it directly.  This means you can re-use the 
>     JavaScript code in other similar script without needing to edit each script 
>     when the JavaScript need changing:
>     
>     open(JAVASCRIPT, "javascript.js");
>     while(<JAVASCRIPT>){print $_}
>     close(JAVASCRIPT);

A more concise way is:

   open(JAVASCRIPT, "javascript.js");
   print <JAVASCRIPT>;
   close(JAVASCRIPT);

Vinicius

Reply via email to