#! /usr/bin/perl -w # this is an example script of how you would use coderefs to define # your CGI::Ajax functions, and the methods return multiple results to # the page # # NB The CGI::Ajax object must come AFTER the coderefs are declared. use strict; use CGI::Ajax; use CGI; my $q = new CGI; my $multiply = sub { my $a = shift; my $b = shift; return $a * $b; }; my $divide = sub { my $a = shift; my $b = shift; return $a / $b; }; my $G = 'asdf'; my $Show_Form = sub { my $html = ""; $html .= qq!