On 7/5/07, Ray <[EMAIL PROTECTED]> wrote:

I'm trying to use this feature of GetOptions:

my %h = ();
GetOptions (\%h, 'length=i');       # will store in $h{length}

sub ParseArgs {
        GetOptions(%OptList) or Getopt::Long::HelpMessage(2);
}

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!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to