in reply to Re: How could I check if a variable is 'read-only'?
in thread How could I check if a variable is 'read-only'?

I've talked about the Scalar::Util module before, and once again it comes to the rescue!
use Scalar::Util qw(readonly); ... if (readonly $x) { ... }
Get used to Scalar::Util and List::Util now - they're standard modules in 5.8.