Using ajax in perl script