in reply to Passing a data structure via a dynamically-built subroutine call
I'll just add that generally when passing parameters to subroutines, get used to passing *references* to data structures instead of the data structures themselves - you'll save yourself a lot of time and headaches :-) Arrays and Hashes get flattened out into a list of parameters which can cause problems if you're not sure exactly how that happens and what to expect in the subroutine. If you always pass references to arrays and references to hashes, then you'll never have a problem - your subroutine will always receive a reference to the array or a reference to the hash, and you know how to work with references, right?
If not, check out 'perldoc perlref' at a command prompt.
HTH.
|
|---|