php and perl in one file.

V

VN

HP said:
Hi All

Can we write php and perl code in one cgi (or any other) file.
from Perl CGI script you could call PHP script, right ?
or you can execute a perl script from PHP too.
 
H

HP

Hi VN

can we execute php part of the code in perl script.
and how can we execute perl script from php.

help me ....
 
M

Matt Garrish

HP said:
Hi VN

can we execute php part of the code in perl script.
and how can we execute perl script from php.

help me ....

How about you help yourself for a change and investigate the problem. LWP
can used to call php scripts and Perl code can be called from within a PHP
script by creating a new Perl object. Neither of which methods you're going
to get your own tutorial on here; that's why documentation exists.

Matt
 
H

HP

Hi VN
i dont wana call php script from perl.
i wana write the php script in the same file of perl script.
can we do it...
 
M

Matt Garrish

HP said:
Hi VN
i dont wana call php script from perl.
i wana write the php script in the same file of perl script.
can we do it...

Explain why you need to call PHP from Perl? I've yet to find anything in PHP
that can't be written in Perl, though the reverse is not true.

Matt
 
M

Matt Garrish

Matt Garrish said:
Explain why you need to call PHP from Perl? I've yet to find anything in
PHP that can't be written in Perl, though the reverse is not true.

In taking a look at your posting style in some other threads, I'm sorry I
even bothered. Please just go away.

Matt
 
J

Jürgen Exner

HP said:

Who is VN? Virtual Newsgroup?
i dont wana call php script from perl.

Did you mean "I don't want to call PHP script from perl"?
Well, then just don't do it but use some other means to call your PHP
script, e.g. command line or whatever other means there are to call a PHP
script.
There is absolutely no reason why you would have to use the Perl interpreter
(and thus a Perl script) to call any program.
i wana write the php script in the same file of perl script.

Did you mean "I want to write the PHP script in the same file as the Perl
script"?
It is a very rare exception that you could use a single file to contain the
code for two different programming languages.
Therefore I would say: Unless proven otherwise no.
can we do it...

Who? You and me? No way!

jue

BTW: It is not obvious from your post if you were refering to some earlier
thread or posting. Therefore I had to go on whatever information you
provided in your article which wasn't much.
 
R

Rich

Hi VN
i dont wana call php script from perl.
i wana write the php script in the same file of perl script.
can we do it...

In what type of application or environment would you have the need to write PHP
and Perl code in the same file? Probably better off selecting one of them and
using that solely. Even if you manage to get it running at all, maintenance and
updates wouldn't be a simple process. From my understanding you could do just
about anything in Perl that you can with PHP, and Perl has a great built-in
debugger. That would be my choice.

Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top