in reply to Modification of a read-only value
There are problems with localizing $_ if the current value is tied. You should use local *_ instead, at least until my $_ is available. Obviously within the scope of *_ you won't have access to @_, &_, or %_, so make sure you e.g. copy your subroutine parameters before the local. The special _ filehandle for filetests does still work after the local, though.