in reply to Re^4: Using Constants in Perl
in thread Using Constants in Perl

You can declare it, yes, but it's not read only. The reference itself remains constant, but the data that it's referring to can be changed:

use constant HASH_REF => { key => 'value' }; HASH_REF->{new_key} = 'new value'; HASH_REF->{key} = 'modified'; use Data::Dumper; print Dumper HASH_REF;