passing data

Discussion in 'Perl Misc' started by PhEaSaNt PLuCKeR, Nov 1, 2005.

  1. 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.


    --

    James (Ukjay)
     
    PhEaSaNt PLuCKeR, Nov 1, 2005
    #1
    1. Advertising

  2. PhEaSaNt PLuCKeR

    Guest

    PhEaSaNt PLuCKeR wrote:
    > 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
     
    , Nov 1, 2005
    #2
    1. Advertising

  3. PhEaSaNt PLuCKeR

    Guest

    "PhEaSaNt PLuCKeR" <> wrote:
    > 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

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Nov 1, 2005
    #3
  4. <> wrote in message
    news:...
    > PhEaSaNt PLuCKeR wrote:
    >> 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


    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
     
    PhEaSaNt PLuCKeR, Nov 1, 2005
    #4
  5. <> wrote in message
    news:20051101163420.428$...
    > "PhEaSaNt PLuCKeR" <> wrote:
    >> 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
    >
    > --
    > -------------------- http://NewsReader.Com/ --------------------
    > Usenet Newsgroup Service $9.95/Month 30GB


    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
     
    PhEaSaNt PLuCKeR, Nov 1, 2005
    #5
  6. "PhEaSaNt PLuCKeR" <> wrote in message
    news:dk8c08$5j2$...
    > 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.
    >
    >
    > --
    >
    > James (Ukjay)
    >
    >


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


    --

    James (Ukjay)
     
    PhEaSaNt PLuCKeR, Nov 1, 2005
    #6
  7. PhEaSaNt PLuCKeR

    Matt Garrish Guest

    "PhEaSaNt PLuCKeR" <> wrote in message
    news:dk8o40$9ei$...
    > 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
     
    Matt Garrish, Nov 2, 2005
    #7
  8. "Matt Garrish" <> wrote in message
    news:cqU9f.4877$...
    >
    > "PhEaSaNt PLuCKeR" <> wrote in message
    > news:dk8o40$9ei$...
    >> 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
    >


    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


    --

    James (Ukjay)
     
    PhEaSaNt PLuCKeR, Nov 2, 2005
    #8
  9. PhEaSaNt PLuCKeR

    Anno Siegel Guest

    PhEaSaNt PLuCKeR <> wrote in comp.lang.perl.misc:
    >
    > "Matt Garrish" <> wrote in message
    > news:cqU9f.4877$...
    > >
    > > "PhEaSaNt PLuCKeR" <> wrote in message
    > > news:dk8o40$9ei$...
    > >> 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
    > >

    >
    > 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
    --
    If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers.
     
    Anno Siegel, Nov 2, 2005
    #9
  10. PhEaSaNt PLuCKeR

    Matt Garrish Guest

    "PhEaSaNt PLuCKeR" <> wrote in message
    news:dk9j06$2t3$...
    >
    > "Matt Garrish" <> wrote in message
    > news:cqU9f.4877$...
    >>
    >>
    >> 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.
    >>

    >
    > 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
     
    Matt Garrish, Nov 2, 2005
    #10
  11. "Matt Garrish" <> wrote in message
    news:662af.5122$...
    >
    > "PhEaSaNt PLuCKeR" <> wrote in message
    > news:dk9j06$2t3$...
    >>
    >> "Matt Garrish" <> wrote in message
    >> news:cqU9f.4877$...
    >>>
    >>>
    >>> 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.
    >>>

    >>
    >> 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
    >


    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.


    --

    James (Ukjay)

    used perl
     
    PhEaSaNt PLuCKeR, Nov 2, 2005
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. terry
    Replies:
    1
    Views:
    493
    William F. Robertson, Jr.
    Jul 7, 2003
  2. Victor Bazarov
    Replies:
    25
    Views:
    967
    E. Robert Tisdale
    Mar 23, 2005
  3. pereges
    Replies:
    7
    Views:
    462
    pereges
    Jun 1, 2008
  4. Ramon F Herrera
    Replies:
    8
    Views:
    510
    Pascal J. Bourguignon
    Sep 13, 2009
  5. deadpickle
    Replies:
    1
    Views:
    1,091
    Jens Thoms Toerring
    Nov 7, 2010
Loading...

Share This Page