- or download this
use constant D50 => [96.42, 100, 82.49];
- or download this
sub D50 () { [96.42, 100, 82.49] }
- or download this
use Readonly;
Readonly::Array my @D50 => (96.42, 100, 82.49);
...
__END__
96.42
Modification of a read-only value attempted at ...
- or download this
BEGIN {
my $x = [96.42, 100, 82.49];
*D50 = sub () { $x };
}
- or download this
use constant D50 => (96.42, 100, 82.49);
- or download this
$ perl -MO=Deparse -e 'use constant X=>[1]; print X->[0]++; print X->[
+0]++'
use constant ('X', [1]);
...
$ perl -le 'use constant X=>[1]; print X->[0]++; print X->[0]++'
1
2