On 2007-03-17 18:14, Ramon F Herrera <> wrote:
> I guess my problem is that when I learned Perl, there was no such
> thing as "my".
Must have been a long time ago. if I remember correctly, "my" was
introduced with perl 5.0 in 1994.
> What the heck is that? I have a vague recollection that
> it was added to make the language object oriented?
No, it just declares a lexically scoped local variable, as most other
programming languages have them (unlike "local" which creates a
dynamically scoped local variable).
> Where can I read about that stuff? Is there a guide about this "my"
> new deal for programmers who already know the "old" Perl?
perldoc is your friend.
perldoc -f my
gives you a short description and also says 'See "Private Variables via
my()" in perlsub for details'. So
perldoc perlsub
is what you should read. If you ares still used to perl4, you should
probably read all of the other core docs as well.
hp
--
_ | Peter J. Holzer | Blaming Perl for the inability of programmers
|_|_) | Sysadmin WSR | to write clearly is like blaming English for
| | |
| the circumlocutions of bureaucrats.
__/ |
http://www.hjp.at/ | -- Charlton Wilbur in clpm