Earlier quoted context omitted.
No, it isn't the same. I'm no language lawyer, but this is my understanding of it. In python, $foo is a reference. It might be a reference to a scalar value, or list, or hash, etc, but it is a reference. The code you wrote might cause confusion for people who don't understand the python model. In perl, $foo might be a scalar value, or it might be a reference to a value of some kind. Perl has this exact same type of p…
I think OP's point was that even in Python you have to be conscious where your "storage" is--that you're sharing it. Yes, the "Python" model (or Java, JavaScript) of referring to everything by reference is uniform and simple--except it still shares the issue of having to care if you add mutation into the mix. Due to its apparent smoothness it might even make it easier to run into that. In a sense Perl is honest here…
> The clean solution for this is functional programming
or another model that guarantees that modifications are never seen by code that isn't explicitly meant to receive them--the prominent other model that's making waves nowadays is of course linear types (and extensions as used by Rust).