Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] basic questoin

Expand Messages
  • Jeff 'japhy' Pinyan
    ... There s still no $tag. ;) When a variable name has a :: in it, everything before the LAST :: is the variable s package -- the namespace it resides in.
    Message 1 of 3 , Oct 26, 2005
    • 0 Attachment
      On Oct 27, nt557 said:

      > What this code do ?
      >
      > $tag::entry = 0;
      >
      > there was NO $tag before inthis code, this is the first usage.

      There's still no $tag. ;) When a variable name has a "::" in it,
      everything before the LAST "::" is the variable's package -- the namespace
      it resides in. $CGI::POST_MAX is the $POST_MAX variable in the CGI
      namespace, and $Data::Dumper::Indent is the $Indent variable in the
      Data::Dumper namespace.

      > what does this mean ?
      >
      > $::group = 2;

      That's a special case of the package::variable syntax; it means $group in
      the main namespace. It's the same as $main::group.

      See

      perldoc perldata

      for more details.

      --
      Jeff "japhy" Pinyan % How can we ever be the sold short or
      RPI Acacia Brother #734 % the cheated, we who for every service
      http://www.perlmonks.org/ % have long ago been overpaid?
      http://princeton.pm.org/ % -- Meister Eckhart
    Your message has been successfully submitted and would be delivered to recipients shortly.