Hi ,
Using TS 6.5 Win 2003 SP1
I have one Constants.pm file .
Have declared a HASH variable in this . Want to access HASH var in another file .
[HTML]
package MyPCK::Constants;
use strict;
use TeamSite::Config;
use Exporter;
our
@ISA = qw(Exporter);
our
@EXPORT = qw(ALL);
my %MY_HASH= (
JPG => "Image",
JPEG => "Image",
GIF => "Image",
DOC => "Microsoft Office",
PPT => "Microsoft Office",
XLS => "Microsoft Office",
VSD => "Microsoft Office",
SWF => "Flash",
PDF => "Adobe",
JSP => "JSP",
HTML => "HTML"
);
[/HTML]
I have second file called 'myPerl.ipl' .
I want to use this HASH var in this file .
I am not able to read the value of this hash var .
I used $MyPCK::Constant::MY_HASH{JPG};
But its giving error .
Could anyone tell me how can I access it from this file .
Also I want to declare this HASH as constant in Contants.pm ....Pls let me know abt this also (ie., how to declare HASH as contant in Constant.pm) .
Regards
Rohit Pathak