On Jul 5, 5:41 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote: > If that's the feature you're trying to use, why are you trying to use > it like that? It seems to want a reference to a hash and a string, but > you give it a hash? Try giving it a reference to a hash and a string, > maybe something like this: > > GetOptions($target_hash_ref, "$item_name=$letter") or ... > > Hope this helps!
I think I should have explained my code. I want to try to construct the arguments for GetOptions, but in a dynamic way. So, instead of hard-coding my switches, like this: GetOptions ( showlog => \$MyArgs{showlog}, 'strategy=s' => \$MyArgs{strategy} ) like is shown in the GetOptions documentation page, I would like to feed the list based upon some arrays (@GlobalSwitches, @LocalSwitches, and @OptionList). I like using the %MyArgs{option} approach because then I wouldn't have to declare a variable for each option I may have. Having said that.. I'm not sure how I could do as you suggest.. How would I set $target_hash_ref to support say the "showlog" switch, and the "strategy" option? Would I be able to refer to each option such as $target_hash_ref{showlog}, or $target_hash_ref{strategy} ? Thanks alot for your help Ray -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/