Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what does it means

Status
Not open for further replies.

ravishanker

Programmer
Oct 8, 2000
14
0
0
IN
Hi,
$lib .= "/perl/NSE";
unshift(@::INC, "$lib/external");
$::INC[@::INC] = "$lib";
$::NetBin="$::NetDir/bin";
What is the use of ::,what does it mean
(Rs)
 
One use i can think for it is for precise variable names. In the package Blah, all variables can be accessed from it's symbol table with
$Blah::foo
or
@Blah::arr
simply putting $:: means to look in the current symbol table. When using modules, if you need to be absolutely sure you're using the right name for a variable or subroutine, you can use the :: syntax.

use Module;
$Module::var;
&Module::sub;

I think this is all correct, but while there may be minor errors, i think this has the general feel for it's use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top