SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru DeNasio's Avatar
    Join Date
    May 2001
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    my $variable = 1?

    I often see codes with the word "my" in front of a variable, like this:

    Code:
    my $variable = 1;
    But what does that "my" word do with the variable?
    Ballot-Box.net - free polls for webmasters
    FormLog.com - free form processor

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2002
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Basically, the word "my" makes the variable local to where the variable is; that is without it every subroutine could see it.
    Richard @ www.e3servers.com
    Multiple Domain Hosting & Web Hosting (Unlimited Domains)
    Reseller Hosting -- 30-Day Money Back Guarantee


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •