On Jan 5, 2004, at 1:48 PM, Johan Meskens CS3 jmcs3 wrote: [..]
i create a datastructure in one.pl
and would like to make it travel to other.pl
so i can process the datastructure there

how do i go about it ?

a direction to point me to ?

pipe ? module ?
[..]

the first part of the problem is whether
what is created in one.pl at run time needs
to be shared with other.pl - or is the
'data structure' more a matter of a general
phrame work - akin to say a generic object,
or C structure.

If one.pl is dynamically creating information
that will need to be shared then you clearly
need to start with

perldoc perlipc

since the stock solutions are basically

        a. write to a file the other will read
        b. open a pipe to the other
        c. open a socket to the other
        d. have one piece of code which if called as
                one.pl will fork itself as other.pl and
                do a pipe between the two - but if called
                as other.pl would execute on ....

one of the simplests ways to do this:

./one.pl | ./other.pl

would be a simple unix pipe in which the stdout
of one.pl becomes the stdin of other.pl - and all
you need is to 'serialize' your data.

The more complex way would be your basic
pipe and exec trick say something like:

<http://www.wetware.com/drieux/pbl/Sys/gen_sym_big_dog.txt>

so you will need to be a bit more clear about whether
it is really run time data - or the fact that both codes
will need a common perl module that understands how to
create a given data structure ( object ) and how to access
the data in that object but with different parameters at run time...

ciao
drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to