If I define a constant in a Perl module, how do I use that constant in my main program? (Or how do I call that constant in the main program?)
Constants are just subs with empty prototype, so they can be exported like any other sub.
# file Foo.pm package Foo; use constant BAR => 123; use Exporter qw(import); our @EXPORT_OK = qw(BAR); # file main.pl: use Foo qw(BAR); print BAR;