class? :: notion

Discussion in 'Perl' started by T Chheng, Aug 17, 2004.

  1. T Chheng

    T Chheng Guest

    hey,
    I'm looking over some perl code and came across this: $Z::status and
    $G::new

    I know that the :: is like a '.' in Java, but are $Z and $G special
    variables? I dont see them defined anywhere in the script.

    thanks
    T Chheng, Aug 17, 2004
    #1
    1. Advertising

  2. T Chheng

    Jim Gibson Guest

    In article <>, T Chheng
    <> wrote:

    > hey,
    > I'm looking over some perl code and came across this: $Z::status and
    > $G::new
    >
    > I know that the :: is like a '.' in Java, but are $Z and $G special
    > variables? I dont see them defined anywhere in the script.


    Z and G are package names. The $ attaches to Z::status, not just Z
    alone. Think of it as '${Z::status}'. 'status' is a symbol in the
    symbol table for package Z.

    Look for lines such as 'package Z' line in your source code. These
    lines might be in a separate file if you have 'do', 'eval', 'require',
    or 'use' in your program.

    FYI: this newsgroup is defunct. Try comp.lang.perl.misc in the future.
    Jim Gibson, Aug 17, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. E11
    Replies:
    1
    Views:
    4,736
    Thomas Weidenfeller
    Oct 12, 2005
  2. christopher diggins
    Replies:
    16
    Views:
    745
    Pete Becker
    May 4, 2005
  3. Arien Malec

    PEP318: radical notion

    Arien Malec, Aug 23, 2004, in forum: Python
    Replies:
    14
    Views:
    516
    Arien Malec
    Aug 27, 2004
  4. Joseph Turian
    Replies:
    5
    Views:
    585
  5. Stefan Ram

    Searching for a notion

    Stefan Ram, Sep 2, 2008, in forum: Java
    Replies:
    15
    Views:
    513
    Stefan Ram
    Sep 3, 2008
Loading...

Share This Page