- or download this
if ($answer=42) { # $answer is now always 42
...
...
...
}
- or download this
use Readonly;
Readonly my $fortytwo => 42; # note: =>, not =
...
if ($fortytwo=$answer) { # "Modification of a read-only value attempte
+d"
...
}
- or download this
use constant FORTYTWO => 42; # note: =>, not =
...
if (FORTYTWO=$answer) { # "Can't modify constant item in scalar assign
+ment"
...
}