🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1706

Invocar Perl desde PHP?

#1706
From: Miguel Farah F.
Date: Wed, 28 Jun 2006 10:45
32 lines
1604 bytes
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: <44a25de5@news.vcd.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!news.vcd.cl!not-for-mail!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,3ed4ece993efdb09,start
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII-7-bit
Sender: "Miguel Farah F."<miguel@antonia.lj.cl>
Message-ID: <44a25de5@news.vcd.cl>
From: NOmigSPuelAM@lj.cl (Miguel Farah F.)
Subject: Invocar Perl desde PHP?
Newsgroups: chile.comp.programacion
Organization: T.I.A.
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 06:45:57 -0400
X-Trace: news.vcd.cl!not-for-mail 1151491557 200.27.221.85 (28 Jun 2006 06:45:57 -0400)
X-Original-Trace: 28 Jun 2006 06:45:57 -0400, antonia.lj.cl
Lines: 32
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!news.vcd.cl!not-for-mail!not-for-mail