Article View: chile.comp.programacion
Article #1709Re: Invocar Perl desde PHP?
From: Alberto Hormazabal
Date: Wed, 28 Jun 2006 13:26
Date: Wed, 28 Jun 2006 13:26
49 lines
1699 bytes
1699 bytes
Miguel Farah F. <NOmigSPuelAM@lj.cl> wrote:
> 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.
http://www.zend.com/php5/articles/php5-perl.php
otra opcion:
http://www.thescripts.com/forum/thread836.html
otra mas:
http://cl.php.net/function.exec
PD: AAG!! ;)
--
El Tuto
tuto@aalc.lj.cl
Technical Details
Message-ID:
<44a2839b@news.vcd.cl>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!news.vcd.cl!not-for-mail!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-7-bit
Message-ID: <44a2839b@news.vcd.cl>
From: Alberto Hormazabal <tuto@lj.cl>
Subject: Re: Invocar Perl desde PHP?
Newsgroups: chile.comp.programacion
References: <44a25de5@news.vcd.cl>
Organization: Loh Juimoh
User-Agent: tin/1.8.1-20060215 ("Mealasta") (UNIX) (Linux/2.6.8-3-686 (i686))
NNTP-Posting-Host: antonia.lj.cl
X-Original-NNTP-Posting-Host: antonia.lj.cl
Date: 28 Jun 2006 09:26:51 -0400
X-Trace: news.vcd.cl!not-for-mail 1151501211 200.27.221.85 (28 Jun 2006 09:26:51 -0400)
X-Original-Trace: 28 Jun 2006 09:26:51 -0400, antonia.lj.cl
Lines: 49
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news.nivel5.cl!news.vcd.cl!not-for-mail!not-for-mail