Hey guys!
I am trying to use complex structures in Perl using hashes.
Let me start with the code:
Imagine a table:
SITECODE BSC BCF BTS TRX
N303 LSANBSC01 1 125 3
%SITE =();
$BSC="LSANBSC01";
$BCFID=1;
$BTSID=125;
$TRX=3;
$SITECODE="N303";
$SITE{$BSC{$BCFID}{$BTSID}{TRX}}=$SITECODE;
print "My Site is $SITE{$BSC{$BCFID}{$BTSID}{TRX}}\n"; # Print the site code
@SITES=values(%SITE);
print "SITES
SITES\n"; #Print the site code (N303)
I would like to know how can I get the the keys of the hash %SITE. and print it.
Many Thanks for the help.
Cheers
I am trying to use complex structures in Perl using hashes.
Let me start with the code:
Imagine a table:
SITECODE BSC BCF BTS TRX
N303 LSANBSC01 1 125 3
%SITE =();
$BSC="LSANBSC01";
$BCFID=1;
$BTSID=125;
$TRX=3;
$SITECODE="N303";
$SITE{$BSC{$BCFID}{$BTSID}{TRX}}=$SITECODE;
print "My Site is $SITE{$BSC{$BCFID}{$BTSID}{TRX}}\n"; # Print the site code
@SITES=values(%SITE);
print "SITES
I would like to know how can I get the the keys of the hash %SITE. and print it.
Many Thanks for the help.
Cheers