Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I call a Perl script from PHP?

Tags:

php

perl

I am interested in knowing the ways we can call/run Perl scripts in PHP.

like image 476
awake416 Avatar asked Sep 17 '10 08:09

awake416


2 Answers

You can use a simple Php Perl extension within the Php code. This will allow you to execute code and Perl variables,functions and instantiate objects.

$perl = new Perl();
$perl->require("test1.pl");
like image 72
Hossome Avatar answered Oct 07 '22 00:10

Hossome


You can make use of

  • system
  • exec
  • backtick operator
like image 31
codaddict Avatar answered Oct 07 '22 01:10

codaddict