On Jan 27, Pozsar Balazs said: >Thank for clarification. But one little drak spot: > >> Thus, accessing constants via &CONST is slower than, and not the same >> process as, accessing it via CONST (or +CONST or CONST()). > >Is there any difference between CONST and CONST()?
Since CONST is defined before-hand, no. It has an empty prototype, so both CONST and CONST() are the same. The reason you might need CONST() is, as has been explained, before a =>, or inside a hash subscript: %programs = ( LANG() => { ... } ); # LANG => is like 'LANG' => print $programs{LANG()}{path}; # {LANG} is like {'LANG'} >What is +CONST? Another way of disambiguating, in the above examples: %programs = ( +LANG => { ... } ); print $programs{+LANG}{path}; See perlop, and look for "Unary +". -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]