okay here is the thing, i have found this really neat piece of code

when I add

<SCRIPT SRC="http://www.mydomain.com/cgi-bin/test.cgi";></SCRIPT>


and test.cgi  has the following code

#!/usr/bin/perl

print "Content-type: application/x-javascript\n";   
print "Pragma: no-cache\n\n";

print "document.writeln(\"test\");";

#######end of script.


it prints test on the web page where i inserted the line

however

when i change the script to

#!/usr/bin/perl



print "Content-type: application/x-javascript\n";   
print "Pragma: no-cache\n\n";

{
    open LOG,"mytext.dat";  
    @log_lines = <LOG>;
    close LOG;

    foreach $line (@log_lines){
       print "document.writeln(\"$line\");";
      }
     
}
########end script


the page loads but it says it has errors


has anybody played with these functions or know where i can find 
documentation on it.?

thanks 
Ambrose

Reply via email to