Ok.. and i'm actually going to top post for this...

when done is should read
$Player{Location}="Inn";

require '$Player{Location}.pl';
whixh is the same as
require 'Inn.pl'; 

and then
'$Player{Location}'::HTML();
which is the same as
Inn::HTML(); 

Do i have the vars correct so that if I want to change 
$Player{Location}="Inn";
to 
$Player{Location}="Gate";
the program would require the correct package
require "Gate.pl"
and the call on the sub HTML in that package?
Gate::HTML();


----- Original Message ----- 
From: "Wiggins d'Anconia" <[EMAIL PROTECTED]>
To: "Luinrandir" <[EMAIL PROTECTED]>
Cc: <beginners@perl.org>
Sent: Wednesday, September 14, 2005 9:22 AM
Subject: Re: Why wont this work? Package require question


> Luinrandir wrote:
> > $Player{Location}="Inn"
> 
> You are missing a semi-colon, and there is no reason to use double
> quotes above.
> 
> > require '$Player{Location}.pl'; #no error here, I think.
> 
> Single quotes don't interpolate.
> 
> > '$Player{Location}'::HTML(); #error occurs here
> > 
> > I'd hate to have to make a big if then else just to do this...
> > 
> 
> Not sure what that would be aimed at.
> 
> http://danconia.org
> 
> > Thanks
> > Luinrandir
> > 
> > 
> > 
> 


-- 
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