in reply to Optional and default parameters for a subroutine
StartCapture( twigs => {filter => $filterTwig, capture => $captureTwig}, hashes => {filter => \%filterHash, capture => \%captureHash}, files => {filter => 'filter.txt', capture => 'capture.txt'}, results => 'c:/temp.txt' );
Notice that I also changed %captureHash and %filterHash to \%captureHash and \%filterHash so they are passed as references instead of flattening into lists.
To access nested elements, you can do something like $args{twigs}{filter}. For more, see perlreftut and perldsc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Optional and default parameters for a subroutine
by ramya2005 (Scribe) on Aug 29, 2005 at 20:25 UTC |