Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by kennethk (Monsignor)
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 studying the Monastery: (7)
As of 2014-12-22 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (110 votes), past polls