\my($x) returns a reference to the $x declared by the my. The brackets are required around $x to avoid $x, __PACKAGE__ being treated as a list of variables associated with the my. In fact the effect is the same if the ( is moved to the left of the my.
So, $x is declared, albeit in a slightly disguised fashion. And the \ doesn't act on the my, but on the newly defined $x 'returned' by the my.
In reply to Re: syntax question
by GrandFather
in thread syntax question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |