in reply to My, what is "my" doing here?
Not sure what bareword error you're getting or expecting. I do get a "Use of uninitialized value" warning (as expected), both as a one-liner and as a regular script, and with various versions of Perl (5.10.0 and later).
$ perl -Mstrict -we 'my ($x,$y)=(0,0); if ($x eq my $y) {}' Use of uninitialized value $y in string eq at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: My, what is "my" doing here?
by locked_user sundialsvc4 (Abbot) on Jan 27, 2012 at 13:21 UTC | |
by JavaFan (Canon) on Jan 27, 2012 at 13:27 UTC | |
by choroba (Cardinal) on Jan 27, 2012 at 13:28 UTC |