For example, in situations like below, I do not want to change the value of $infilename
anywhere in the program after initialization.
my $infilename = "input_56_12.txt";
open my $fpin, '<', $infilename
or die $!;
...
print "$infilename has $result matches\n";
close $fpin;
What is the correct way to make sure that any change in $infilename
results in not just warnings, but errors?