in reply to my and local differences

How old are these scripts? Could be from Perl 4 days when "my" didn't exist.
I had scripts written pre-5 that had local, but when I was rewriting, I often would use my.
For online documentation, the links at perldoc:
my & local do a better job of explaining than I could.

Replies are listed 'Best First'.
RE: RE: my and local differences
by HaB (Sexton) on Nov 10, 2000 at 23:33 UTC
    They aren't from perl4...the date in the comments is actually from August of this year. I just think it's the programmer's unfamiliarity with the language.
    There are other indicators that lead me to believe this. He doesn't ever use any modules, or even some of the standard lib stuff. For example, he's still packing socket addresses with:
    $sockaddr = 'S n a4 x8'; $this = pack($sockaddr, $AF_INET, $port, $thisaddr);
    And no, the $AF_INET isn't a typo, he's setting it at the start, cause he's not even using use Socket;
    So...

    *shrug*


    -HaB


    hword.