in reply to nuances of my, and maybe local

The easy way to deal with my is to simply erase the two letters of m and y, and use the normal rules for parsing. So
my ($a) = <STDIN>;
acts like
($a) = <STDIN>;
and
my $a = <STDIN>;
acts like
$a = <STDIN>;
Once you get that you just "erase the my" and continue the parse, it's simple to reduce to cases you've already known.

-- Randal L. Schwartz, Perl hacker