# You don't declare a constant like this: use constant $FOO => 1; # bad # You do it this way use constant FOO => 1; # And use it like this: print FOO;