--- drieux <[EMAIL PROTECTED]> wrote: > hence > $globals{var1} - scalar variable > $globals{var1_a} - array variable > $globals{var1_h} - hash variable > $globals{var1_s} - sub variable > $globals{var1_ar} - reference to an array variable > $globals{var1_hr} - reference to an hash variable
Minor nit: side note, really: "var1_hr" and friends are simply Hungarian Notation. In a statically typed language, this isn't such a bad thing. However, Perl is dynamically typed and it's really easy to do this: $globals{var1_hr} = \%some_hash; # later $globals{var1_hr} = \@some_array; The problem with Hungarian Notation is that you are embedding documentation in the variable name. If the type of data changes, either you have to change the variable names (which you wouldn't have to if this was left off), or you have a variable claiming to be a hashref when it's really an array ref. This can cause some serious cognitive issues when someone sees: @{ $foo{hash_ref}} } My first thought on seeing that would be that someone is trying to use a hash slice. Not fun. I'd drop the notation. Cheers, Curtis "Ovid" Poe ===== "Ovid" on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]