>>>>> "Xavier" == Xavier Noria <[EMAIL PROTECTED]> writes:
Xavier> Currently Perl has no lexical constants, the idioms to accomplish what you Xavier> want are this one Xavier> { Xavier> my $fake_constant = 50; Xavier> sub my_syb { Xavier> # closure, uses $fake_constant Xavier> } Xavier> } You left off the "BEGIN". Very important if this code is down towards the end of your script. The "my" declaration there has a compile-time component (declaring the variable) and a runtime component (initializing it to 50), and you have to be sure to "run" this code before the subroutine might be called. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>