Article View: chile.comp.programacion
Article #1715Re: Invocar Perl desde PHP?
From: digital
Date: Fri, 30 Jun 2006 21:40
Date: Fri, 30 Jun 2006 21:40
53 lines
2333 bytes
2333 bytes
Otra opcion podr�a ser, si el script Perl est� disponible por http:
<h1>resultado</h1>
<? $x= file_get_contents('http://www.tusitio.cl/scriptperl.pl?argumento1=' .
$valor1 . '&argumento2=' . $valor2); ?>
<? if ($x="si" { ?>
<b>anduvo!</b>
<? } ?>
Eso.
(en todo caso, si cuentas con PHP5, es mucho mejor la opci�n de usar
PHP::Perl de PHP5)
---
Alejandro V�squez N.
alejandro.vasquez@neurotools.cl
Neurotools - Herramientas Inteligentes
"Miguel Farah F." <NOmigSPuelAM@lj.cl> escribi� en el mensaje
news:44a25de5@news.vcd.cl...
> Tengo un script en Perl como este:
>
> #!/usr/bin/perl
> if (($ARGV[0] eq "1") && ($ARGV[1] eq "2")) {
> $resultado="si";
> } else {
> $resultado="no, gracias";
> }
>
>
> Quiero armar una pagina web que reciba dos parametros en un form, los
> entregue al script, y una pagina de resultado (en PHP) hace algo con el
> string que Perl entrega. Algo como este pseudocodigo:
>
> <h1>resultado</h1>
>
> <? $x=[invocar a Perl con los dos parametros]; ?>
>
> <? if ($x="si" { ?>
> <b>anduvo!</b>
> <? } ?>
>
>
> La parte que no tengo clara es como diablos invocar a Perl directamente.
>
>
> --
> MIGUEL FARAH // NOmigSPuelAM@lj.cl
> #include <disclaimer.h> // http://www.farah.cl
> <*>
> "Well, of COURSE I did it in cold blood, you idiot!... I'm a reptile!"
> - The Far Side
Technical Details
Message-ID:
<e845g0$cse$1@proxy.ifxnw.cl>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!news2.ifxnw.cl!not-for-mailReferences:
<44a25de5@news.vcd.cl>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,3ed4ece993efdb09 X-Google-Attributes: gid1593cb,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!news2.ifxnw.cl!not-for-mail From: "digital" <avasquenNOSPAM@NOSPAMpuc.cl> Newsgroups: chile.comp.programacion Subject: Re: Invocar Perl desde PHP? Date: Fri, 30 Jun 2006 17:40:00 -0400 Organization: IFX Networks News Server Lines: 55 Message-ID: <e845g0$cse$1@proxy.ifxnw.cl> References: <44a25de5@news.vcd.cl> NNTP-Posting-Host: 200.73.29.100 X-Trace: proxy.ifxnw.cl 1151703360 13198 200.73.29.100 (30 Jun 2006 21:36:00 GMT) X-Complaints-To: abuse@ifxnetworks.com NNTP-Posting-Date: Fri, 30 Jun 2006 21:36:00 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.2663 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2663 X-RFC2646: Format=Flowed; Original