Write a program that explains the symbolic table clearly?

Answer

In Perl, the symbol table is a hash that contains the list of all the names defined in a namespace and it contains all the functions and variables. For example:

Perl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
subSymbols
 
{
 
my($hashRef)=shift;
 
my(%sym);
 
my(@sym);
 
%sym=%{$hashRef};
 
 
@sym=sort(keys(%sym));
 
foreach(@sym)
 
{
 
printf("%-10.10s| %s\n",$_,$sym{$_});
 
}
 
}
 
Symbols(\%Foo::);
 
packageFoo;
 
$bar=2;
 
subbaz{
 
$bar++;
 
}

All perl Questions

Ask your interview questions on perl

Write Your comment or Questions if you want the answers on perl from perl Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---