Passing hashes as parameters 
Author Message
 Passing hashes as parameters

Does anyone know how to pass a hash as a parameter from one script to another?


Fri, 24 Sep 2004 23:49:49 GMT  
 Passing hashes as parameters

Quote:

> Does anyone know how to pass a hash as a parameter from one script to another?

You really mean *script*, not *sub*? There is of course no builtin
way to do this, because from the viewpoint of one script, the other one
is just some external program, so you must marshal your hash into some
external representation and pass it via sockets, a file or - if the

Actually, you don't have to reinvent the wheel. Have a look at the
standard module Data::Dumper, which likely does exactly what you
are looking for.

Ronald



Sat, 25 Sep 2004 19:48:11 GMT  
 Passing hashes as parameters

Quote:

>                       ...you must marshal your hash into some
> external representation and pass it via sockets, a file or - if the

> Actually, you don't have to reinvent the wheel. Have a look at the
> standard module Data::Dumper, which likely does exactly what you
> are looking for.

Actually Data::Dumper is only rarely the best option for this sort of
thing.  There are several other options on CPAN (e.g. Storable) that a
usually more suited.

This newsgroup does not exist - please do not start threads here.



Mon, 27 Sep 2004 00:34:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to use a reference to hash passed as parameter

2. How to pass hash as sub parameter?

3. How to pass hashes to function as parameter?

4. Passing HASH as a parameter

5. Passing multiple arrays and hashes as parameter

6. How to use a reference to hash passed as parameter

7. Passing hash of hashes from subroutine?

8. Like Getopt::Foo but for sub parameter passing?

9. Parameter Passing : Recursion Problem!!!

10. Passing parameters to a function in an EXE file thru registry

11. Passing Parameter in Perl

12. (Possible bug?) Changing passed parameters

 

 
Powered by phpBB® Forum Software