in reply to Re: call subroutine if scalar is changed
in thread call subroutine if scalar is changed

I suppose this could be used to couple two variables @a=@$a or vice versa $a=@$a such that the coupling survives new assignments and the partner is destroyed as soon as the original is? 🤩

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

  • Comment on Re^2: call subroutine if scalar is changed

Replies are listed 'Best First'.
Re^3: call subroutine if scalar is changed
by ikegami (Patriarch) on Jul 29, 2019 at 03:22 UTC

    Yes, though I think it would be easier with tie.