Yes, though I think it would be easier with tie.
In reply to Re^3: call subroutine if scalar is changed by ikegami in thread call subroutine if scalar is changed by Anonymous Monk