Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

RE: my and local differences

by lemming (Priest)
on Nov 10, 2000 at 23:17 UTC ( [id://41001]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://41001]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-07-17 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.