>>>>> "PN" == Palit, Nilanjan <[EMAIL PROTECTED]> writes:

  PN> I was hoping there was a way around that still satisfied 'strict refs'.

that is the whole point of strict refs, to disallow using a string for a
variable name. there are many reasons this is a good thing and your
trying to work around it is not a good thing.

this is a very good article about symrefs:

http://perl.plover.com/varvarname.html 


and my general answer to this problem is that symrefs are just using the
symbol table as a data structure. but the symbol table is meant fir
munging symbols and has side effects and is slower than using a real
data structure (a hash). using a hash has many benefits including as
isolation (symrefs are global). you can build many instances of hashes
with real references and such but there can only be one global name used
in a symref.

so learn how to use a hash there. it is the correct and better solution
and far safer. use strict is there for a reason and it recommended to be
used on all perl programs other than tiny quickies or one liners.

thanx,

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to