FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » randomly sorting files in php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: getting perl and php to talk to each other [message #180618 is a reply to message #180603] Thu, 07 March 2013 06:37 Go to previous messageGo to previous message
Cal Dershowitz is currently offline  Cal Dershowitz
Messages: 36
Registered: February 2013
Karma:
Member
On 03/05/2013 05:08 PM, Jerry Stuckle wrote:
> On 3/5/2013 6:59 PM, Ben Morrow wrote:

>>>> Why on Earth would you want to do that? Seriously, I can't think of any
>>>> situation where mixing PHP and Perl is easier than just writing in Perl
>>>> in the first place.
>>>
>>> Other people would say the same about writing PHP instead of a mix.
>>
>> Yes, of course.
>>
>
> A long shot - maybe you have a package in one language you need to feed
> input to. But that input must first be processed by a package in the
> other language. Rather than rewrite everything, merge them together.

What I wanted to do that this article had mentioned was to be able to
call perl reliably either from php or from a bash script that
comprehends it all.
>
> Or, perhaps you need to build the data preprocessor, and aren't familiar
> with the language the package is written in.

I've chosen this rather arbitrary task just to see what I can do with
this syntax which is new to me, php, as opposed to what a person can do
with, perl, which I have previously used to give me a webpage.
>
> I agree it would be quite rare, but it's about the only reason I could
> think of people would need both languages. I'm sure there are more,
> though.

Can I use perl regex's or do I have to learn a whole 'nother idea of
what that is?
>
>>> However, there can be value in two programming languages in the same
>>> program. Just consider what kinds of data you can pass via the command
>>> line and what kinds you cannot pass that way (yes, there are text files,
>>> named pipes, and other equally ugly workarounds).
>>
>> The methods used by PHP::Interpreter are not really any less ugly. Until
>> you get to the point of being able to run the two languages on the same
>> VM with properly interworking data structures (such as Parrot is trying
>> to achieve, for instance) I don't see much point stuffing the two
>> languages into the same process and then just passing strings to eval
>> back and forth.
>>
>
> I doubt that they'll ever have internetworking data structures, though.
> Just not a need for it.

No, nothing like that complex.

[snip]

[OT]
> I wouldn't have bothered looking up when a Perl module was shipped, either.
>
> BTW - comp.lang.perl.misc added back since this is about both languages.
>

I'm not thrilled with being OT again, but I just can't get
PHP::Interpreter to install and don't know exactly why. I don't like to
be OT, but something that seems to work for others isn't for me now, and
it's not at the level of scripting languages.

I can ask very-flawed specific questions but need to wonder aloud why
php-config doesn't work, why files that are supposed to be there aren't,
and how I troubleshoot the basic function of it before I actually get
this topic off the ground.

What exactly do I have to do at this point to get a php-config that
works as far as PHP::Interpreter is concerned?

I've tried ten things that don't work.
--
Cal
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to avoid the use of session variables in this script
Next Topic: all done
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 14 13:25:58 GMT 2024

Total time taken to generate the page: 0.04703 seconds