On Sep 14, Luinrandir said:
$Player{Location}="Inn"
require '$Player{Location}.pl'; #no error here, I think.
'$Player{Location}'::HTML(); #error occurs here
The single quotes are wrong.
$Player{Location} = "Inn";
require "$Player{Location}.pl"; # loading, for example, Inn.pl
Now you want to call the Inn::HTML() function, right? You can't easily do
it if strict is turned on. Here's one way, though:
my $glob = $main::{$Player{Location} . "::"}{HTML};
$glob->();
--
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>