in reply to Puzzled by constant subs

The constant pragma will take care of this for you, too. Behind the scenes it creates subs with empty prototypes.

use constant one => 1; use constant two => 2;
--
brian d foy <bdfoy@cpan.org>

Replies are listed 'Best First'.
Re^2: Puzzled by constant subs
by grinder (Bishop) on Mar 09, 2005 at 15:24 UTC
    The constant pragma will take care of this for you

    This is true, and I use constants whenever I can, even though interpolating them into strings gets ugly quickly. I suppose that means I value constancy more than elegancy.

    The above snippet, however, is a simplification of the Real Word problem, and Anonymonk's suggestion about using prototypes was what I needed to get it straight.

    - another intruder with the mooring in the heart of the Perl