Re: talking to Perl for a text-cleanup.

From: Date: Tue, 15 Apr 2003 14:35:27 +0000
Subject: Re: talking to Perl for a text-cleanup.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143951@lists.php.net to get a copy of this message
Enclose your command in backticks to call that actual line $formated_text = `perl -MText::Autoformat -e'autoformat{right=>63, all=>1}'`; julien Beauviala wrote:
I'm working on a php-email-etc thing, and would like to use Damian Conways' Text::AutoFormat perl module to clean up wrapping, quoting etc (wordwrap does not deal as well with multi-level quotings, attribution, flagging). Ideally I would send the content of field $txt (the content of the email I'm trying to reply to) to a command like : ---------------------------- perl -MText::Autoformat -e'autoformat{right=>63, all=>1}' ---------------------------- or to a small perl script reading from stdin : ---------------------------- #!/usr/bin/perl use Text::Autoformat;
        autoformat{right=>63, all=>1};
---------------------------- and get the result back to the php page for display as $txt2. I don't have any ideas about how to get PHP to talk to perl and listen back. Any ideas on how to achieve this ? j.


« previous php.general (#143951) next »