By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,022 Members | 856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,022 IT Pros & Developers. It's quick & easy.

Is there a better way? (perl in PHP)

P: n/a

Is there a better way of doing this?

I want to take in a large amount of text/data, process it with a perl script
then print the results to the browser

<?php
$tmpfname = tempnam ("/tmp", "FOO");
$fp = fopen($tmpfname, "w");
fwrite($fp, $text_in);
fclose($fp);
if (isset($alias)) {
$file = `perl /home/httpd/cgi-bin/perl_script.pl $tmpfname`;
unlink($tmpfname);
print"$file";
?>

The load on the site is very low
--

Michael
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
NPC rights activist | Nameless Abominations are people too.
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.