>>>>> "PN" == Palit, Nilanjan <[EMAIL PROTECTED]> writes:
PN> Thanks for the responses. I did use "my" to declare the variables -
PN> removing that allowed me to reference the variables correctly.
and no one warned you about the evils of doing that. read this:
http://www.plover.com/~mjd/perl/varvarname.html
and my answer is that using symrefs (or eval) is just using the symbol
table as a hash. but the symbol table is just a special hash tree with
global side effects. so why not just use a regular hash as it is safer
(no global side issues), more flexible (you can pass it around, take
references, create anonymous hashes) and you can create lexical hashes.
the rule is: mung the symbol table only when you must have changes in
the symbol table. if you are just munging data use regular data
structures.
uri
--
Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm