The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 18, 2019, 12:18:26 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Implementing Perl scripts/libraries in PHP  (Read 3680 times)
DangerMouse
Expert
****
Offline Offline

Posts: 244



View Profile
« on: March 20, 2008, 11:35:19 AM »

Hey all,

Maybe a totally off the wall question, although I've seen this so I believe its possible - http://pecl.php.net/package/perl - how would you go about implementing perl stuff in php?

Basically I want to take advantage of perls natural language processing power and libraries, but having never coded in perl I was hoping to interface it with php somehow. Pipe dream or possible?

DM
Logged
dink
Expert
****
Offline Offline

Posts: 349


View Profile
« Reply #1 on: March 20, 2008, 04:02:39 PM »

I'm with DM.  Seems like it should be possible, just don't know
where to start.
Logged

[quote Nutballs]
the universe has a giant fist, and its got enough whoop ass for everyone.
[/quote]
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: March 20, 2008, 05:03:35 PM »

Man this has the possibility of being a great thread. I've always had a hankering to work with mechanize, but hate PERL enough to stay away. I'd learn a bit if it was effective under PHP.

Hoping smarties like Dirk or JasonD will chime in here...
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
DangerMouse
Expert
****
Offline Offline

Posts: 244



View Profile
« Reply #3 on: March 20, 2008, 05:36:07 PM »

Attempted to install the PECL extension above but without success so far, it appears although my windowz PHP 5.2.5 doesnt have a compiled php_perl.dll available yet and the older version doesnt seem to work.

Not sure my shared hosting account will allow me to install PECL extensions, unlikely, but I may be able to complile it and pass it back to try again on Windows. Will let you know how I get on - will probably end up asking noob linux questions when my compiling fails!

DM
Logged
dink
Expert
****
Offline Offline

Posts: 349


View Profile
« Reply #4 on: March 20, 2008, 08:36:54 PM »

I don't suppose it would be something as simple as
exec(myScript.pl)
would it?
Logged

[quote Nutballs]
the universe has a giant fist, and its got enough whoop ass for everyone.
[/quote]
dirk
Global Moderator
Expert
*****
Offline Offline

Posts: 416


View Profile
« Reply #5 on: March 20, 2008, 10:28:31 PM »

Sounds interesting. Better than calling Perl scripts with exec or so.

Would be an easy way to use Perl modules, like:

$perl->eval('use Digest::MD5');
echo $perl->{'Digest::MD5::md5_hex'}('Hello');

Anyway, I haven't used it before. Will try to install it
and run some tests.

Installation on Windows seems to be a bit tricky.

Dirk
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #6 on: March 20, 2008, 10:34:59 PM »

WINDOWS?!?!?!

Was that DIRK that just posted that he's using WINDOWS?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
dink
Expert
****
Offline Offline

Posts: 349


View Profile
« Reply #7 on: March 20, 2008, 11:10:29 PM »

Easy Perk.  Remember he has customers that use all sorts of weered systems.  I think I heard that some of them even slop over into mac.  Or was it apple-sauce.  Can't be sure.

In any case, he needs to be able to duplicate the errors that they bring on to themselves.   ROFLMAO
Logged

[quote Nutballs]
the universe has a giant fist, and its got enough whoop ass for everyone.
[/quote]
dirk
Global Moderator
Expert
*****
Offline Offline

Posts: 416


View Profile
« Reply #8 on: March 21, 2008, 06:24:57 AM »

Indeed, it's me.  Wink

I'm using lots of programs. Some on Windows, some on Linux.

For example, I develop the programs on Windows using Komodo
and test and run them on one of our Linux servers.

There are lots of programs which are not available for Linux.

Anyway, no worry, most of our servers are Linux ones. Smiley

Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #9 on: March 21, 2008, 08:07:13 AM »

Whew... man that had a sphincter factor of about 9.5 honestly.  ROFLMAO
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!