Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How to return Hashref from one script to another script?

by kennethk (Abbot)
on Mar 12, 2014 at 16:28 UTC ( #1078045=note: print w/ replies, xml ) Need Help??


in reply to How to return Hashref from one script to another script?

Expounding on Corion's comment:

  • How are you invoking and communicating with your child? If you are using text (e.g. piping, backticks or a common file), then XML makes sense because you are already handling it. Data::Dumper and eval could also work, but that's a little more hackish.

  • Consider using threads and threads::shared; then you can literally pass the object. This will require some additional crafting if your child script is canned.

  • Finally, why are you doing interprocess communication? It generally makes things profoundly more complicated. There are times when it's necessary, but I try to avoid it when I can.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: How to return Hashref from one script to another script?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1078045]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2015-07-04 03:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls