That kind of magic in Perl has a different kind of meaning than "magic number/bool/string parsing" in YAML.
Perl tied-variable magic just means there are (effectively) getter and setter properties attached to the variable. "Magic" is just the name that was chosen in the implementation, and it stuck.
It's used to implement variables with special, automatic meanings, like $$ for "current pid" and $! for "last error".
It's also used to implement variables with user-defined behaviours on access, which is quite handy for a lot of abstractions.
A lot of modern languages support both of these things, because they are useful, but it's not called magic in those languages, it's called something like "watchers", "proxies", "getters and setters" or "hooks".
No, the criticism of YAML-style "magic" is that it leads to entirely surprising behaviour from innocuous input. Perl magic is not that kind. If you're using a special variable, you already know why.