mmmmmmm i did in a single line and i keep havinh the problem
my $html = <<EOHTML;<HTML><BODY>Enter something:<input type="text" name="val1" id="val1"onkeyup="exported_func( ['val1'], ['resultdiv'] );"><br><div id="resultdiv"></div></BODY></HTML>EOHTML return $html; 2008/4/4, Rob Dixon <[EMAIL PROTECTED]>: > > Pau Marc Munoz Torres wrote: > > Hi > > > > I just copied this script from CGI::Ajax manual at cpan.org page > > > > use strict; > > use CGI; # or any other CGI:: form handler/decoder > > use CGI::Ajax; > > > > my $cgi = new CGI; > > my $pjx = new CGI::Ajax( 'exported_func' => \&perl_func ); > > > > print $pjx->build_html( $cgi, \&Show_HTML); > > > > sub perl_func { > > my $input = shift; > > # do something with $input > > my $output = $input . " was the input!"; > > return( $output ); > > } > > > > sub Show_HTML { > > my $html = <<EOHTML; > > <HTML> > > <BODY> > > Enter something: > > <input type="text" name="val1" id="val1" > > onkeyup="exported_func( ['val1'], ['resultdiv'] );"> > > <br> > > <div id="resultdiv"></div> > > </BODY> > > </HTML> > > EOHTML > > return $html; > > } > > > > And I get the error: > > > > Can't find string terminator "EOHTML" anywhere before EOF at ./ajax.pl > line > > 37. > > > > What's wrong? > > > The here-document terminator EOHTML must be on its own on the line, i.e. > there can't be any whitespace before or after it or it won't be found. > > > Rob > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > -- Pau Marc Muñoz Torres Laboratori de Biologia Computacional Institut de Biotecnologia i Biomedicina Vicent Villar Universitat Autonoma de Barcelona E-08193 Bellaterra (Barcelona) telèfon: 93 5812807 Email : [EMAIL PROTECTED]