On Sep 17, Luinrandir said:

ok I have the program working again.
but how do I get a var from the package?

and the cgi calls the var in the package like this
my $V = $main::{$Player{Location} . "::"}{Options};

What does that return to you? A glob. And a glob is like a reference to every data type. To get the scalar variable found in the glob, you have to dereference the glob as if it were a scalar:

  my $g = $main::{$Player{Location} . "::"}{Options};
  my $value = $$g;

or, as one line:

  my $value = ${ $main::{$Player{Location} . "::"}{Options} };

--
Jeff "japhy" Pinyan        %  How can we ever be the sold short or
RPI Acacia Brother #734    %  the cheated, we who for every service
http://www.perlmonks.org/  %  have long ago been overpaid?
http://princeton.pm.org/   %    -- Meister Eckhart

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


Reply via email to