in reply to My, what is "my" doing here?
my creates* a variable and returns it at an lvalue, so $x eq my $y compares $x with newly created and undefined $y. That DOES cause a warning, contrary to what you claim.
I'm surprised you asked this because you use the return value of my every time you write Perl code.
* — Exactly when the variable gets created is a little funky, but that's not relevant here.
|
|---|