passing data

  • Thread starter PhEaSaNt PLuCKeR
  • Start date
P

PhEaSaNt PLuCKeR

Hello

How do I get two running perl scripts to pass data to each other?
Another quickie, Is it possible to open a web page from a perl script, but
be able to run the
script viewable in a dos shell and also see data passed from that script to
a web page?

Has anyone done this?
If so any hints or tips Please.
 
U

usenet

PhEaSaNt said:
How do I get two running perl scripts to pass data to each other?
The usual approach is to use sockets.

perldoc -f socket
perldoc IO::Handle

But you seem to be a novice, and most novices who want to pass data
between two running scripts don't _really_ want to do that.
Another quickie, Is it possible to open a web page from a perl script, but
be able to run the script viewable in a dos shell and also see data passed
from that script to a web page?

Your question is garbled. If you are asking if it is possible to run a
Perl CGI script from a console (DOS shell, whatever) then the answer is
yes.

perldoc CGI

I also recommend the comp.lang.perl.misc posting guidelines:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
 
X

xhoster

PhEaSaNt PLuCKeR said:
Hello

How do I get two running perl scripts to pass data to each other?

There are many ways, depending on the amounts of data, the frequency of the
data passing, the familial relationship of the scripts, the need for
blocking or non-blocking, locking, presence of security concerns, etc.

see perldoc perlipc.

Xho
 
P

PhEaSaNt PLuCKeR

The usual approach is to use sockets.

perldoc -f socket
perldoc IO::Handle

But you seem to be a novice, and most novices who want to pass data
between two running scripts don't _really_ want to do that.


Your question is garbled. If you are asking if it is possible to run a
Perl CGI script from a console (DOS shell, whatever) then the answer is
yes.

perldoc CGI

I also recommend the comp.lang.perl.misc posting guidelines:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

Well I am using IO::Socket; in my script already to obtain the initial set
of data
and I must admit I didn't think of doing it with a socket for my other
purpose.

Thanks

James
 
P

PhEaSaNt PLuCKeR

There are many ways, depending on the amounts of data, the frequency of
the
data passing, the familial relationship of the scripts, the need for
blocking or non-blocking, locking, presence of security concerns, etc.

see perldoc perlipc.

Xho

Ok Thanks Xho, The data is continuous via a socket.
(use IO::Socket;)
So my first script is the data engine, I need to pass various commands to
this engine
Then have it obtain the data so that i can present it continuously in some
other form
using another script.
Was never very good at explaining in fact "The hardest part is how to ask a
question" in my case ;-)

Thanks agn
James
 
P

PhEaSaNt PLuCKeR

PhEaSaNt PLuCKeR said:
Hello

How do I get two running perl scripts to pass data to each other?
Another quickie, Is it possible to open a web page from a perl script, but
be able to run the
script viewable in a dos shell and also see data passed from that script
to a web page?

Has anyone done this?
If so any hints or tips Please.

Just found perlipc (Perl interprocess Communication)
Makes interesting reading!
 
M

Matt Garrish

PhEaSaNt PLuCKeR said:
So my first script is the data engine, I need to pass various commands to
this engine
Then have it obtain the data so that i can present it continuously in some
other form
using another script.
Was never very good at explaining in fact "The hardest part is how to ask
a question" in my case ;-)

If you can't present your situation clearly, then you shouldn't be pushing
ahead with the programming. You should sit down and work out all the
vagaries in your statement above before you wind up wasting hours/days
coding a socket solution that never required a continuously running script
in the first place.

Matt
 
P

PhEaSaNt PLuCKeR

Matt Garrish said:
If you can't present your situation clearly, then you shouldn't be pushing
ahead with the programming. You should sit down and work out all the
vagaries in your statement above before you wind up wasting hours/days
coding a socket solution that never required a continuously running script
in the first place.

Matt

You know the problem is that there are too many people who are quick to
criticize on here LOL
The point I was making was it is difficult to explain the help required NOT
what I need to achieve!
I never said I would use a socket solution, DID I????
So before you jump down my throat etc. LMFAO
 
A

Anno Siegel

PhEaSaNt PLuCKeR said:
You know the problem is that there are too many people who are quick to
criticize on here LOL

LOL? What's funny?
The point I was making was it is difficult to explain the help required NOT
what I need to achieve!

Being unable to explain a problem is a sign of insufficient understanding.
I never said I would use a socket solution, DID I????

Don't try to fool people about what you said and didn't say. Your words:

Ok Thanks Xho, The data is continuous via a socket.
(use IO::Socket;)
So before you jump down my throat etc. LMFAO

You come across slightly hysterical with all that laughter.

Anno
 
M

Matt Garrish

PhEaSaNt PLuCKeR said:
You know the problem is that there are too many people who are quick to
criticize on here LOL
The point I was making was it is difficult to explain the help required
NOT what I need to achieve!
I never said I would use a socket solution, DID I????
So before you jump down my throat etc. LMFAO

It's not called jumping down your throat; it's called telling you to do your
design first before you start coding with only half-formed ideas. It's nice
that you have a general concept that you want some script to run and do
something and pass some kind of data to another script or something, but
that shows that you haven't taken your design to the next step, which is
working out the details to a level where you're reasonably sure about all
aspects of your plan.The last guy I saw try to code without a good design
took a three week job and turned it into an eleven month debacle before
being encouraged to leave the company.

Matt
 
P

PhEaSaNt PLuCKeR

Matt Garrish said:
It's not called jumping down your throat; it's called telling you to do
your design first before you start coding with only half-formed ideas.
It's nice that you have a general concept that you want some script to run
and do something and pass some kind of data to another script or
something, but that shows that you haven't taken your design to the next
step, which is working out the details to a level where you're reasonably
sure about all aspects of your plan.The last guy I saw try to code without
a good design took a three week job and turned it into an eleven month
debacle before being encouraged to leave the company.

Matt

Ok Matt I take your point but in this particular instance I must admit that
this
project is a rather free and easy one.
I would like to try using a socket to pass data, even though there may be
another way of doing things.
The reason being I am already thinking of other ideas that I could employ
doing it this way.
So discussing this has already paid dividends for me!
Ok I will confess, it's just a means to get used to coding in perl, I have
coded in c++ and Java, but only
briefly tried perl before.
 

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

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top