kvarnerexpress 0 Report post Posted August 27, 2005 Hi allI've been using XMLHttpRequest with PHP but the time has come where i need the features of perl! But i've fallen at the first hurdle....when using XMLHttpRequest with php you can send a response back by using "echo"I cant seem to find a way of sending a response back in perl, anyone know of something similar to echo? I've looked through LWP but couldnt find anything suitable??thankskvarnerexpress Share this post Link to post Share on other sites
slu 0 Report post Posted October 27, 2005 I cant seem to find a way of sending a response back in perl, anyone know of something similar to echo? I've looked through LWP but couldnt find anything suitable?? 179108[/snapback] That would be print. Here's the most simple perl/cgi-script: #!/usr/local/bin/perlprint "Content-Type: text/plain\n\n";print "hello";Notes: * You might need to change the path in the first (shebang) line, it depends on your platform... * Change text/plain to text/html if you want to return HTML * print is standard perl and has nothing to do with CGI/LWP - everything sent to standard out is send to the users browser. Share this post Link to post Share on other sites
dul 0 Report post Posted October 27, 2005 #!/usr/local/bin/perlecho "Content-Type: text/plain\n\n";echo "It is simple";Try this Share this post Link to post Share on other sites