-- tried to send this yesterday - no luck. Here goes again....

use strict;
use vars qw($one $two);

$one = "two";
$two = "two";
{
        no strict "refs"; # turns off strict refs for the scope of the
enclosing block
        print ${$one}; # prints out "two"
}
print ${$one}; # blows up


HTH,

Nikhil.

-----Original Message-----
From: Andy td [mailto:[EMAIL PROTECTED]]
Sent: 05 June 2001 22:03
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Revised: Symbolic References & "use strict;"



Hi!

I'm writing a program that uses "use strict;" (which requires the variable
to be declared before it's can be used) and symbolic references (e.g.
$$cmd{$ext}++;).
When I run the program, I get the error saying I must declare the variable
$$cmd first. 
Please let me know can I solve this problem without removing "use strict;"
from my program.

Thanks,
Andy





_______________________________________________________
Send a cool gift with your E-Card
http://www.bluemountain.com/giftcenter/


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users


------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to