E
evillen
Hi
Please help, I can't figure out why my hash value not being
interpolated correctly?
code snippet:
begin
-------
@symbol_data = (CONN_UMP_3MM_SMT, sym.req:0554,
lib.name:conn_ump_3mm_smt, height:3.00mm, used:01ATiss1/Whitney RF,
(rev:2,NJH,26/05/04));
$symbols_and_data{$symbol_data[0]} = @symbol_data;
print "\$symbol_data[0] is: $symbol_data[0]\n";
print "Hash value is currently: $symbols_and_data{$symbol_data[0]}\n";
-------
end
description of problem:
I have the following array which has six elements:
@symbol_data = (CONN_UMP_3MM_SMT, sym.req:0554,
lib.name:conn_ump_3mm_smt, height:3.00mm, used:01ATiss1/Whitney RF,
(rev:2,NJH,26/05/04))
So far so good, I then dynamically declare and assign a hash key:
$symbols_and_data{$symbol_data[0]} = @symbol_data; #Create a Hash with
symbol name as key and data as value
Then I want to check a value:
print "\$symbol_data[0] is: $symbol_data[0]\n";
that produces this:
"$symbol_data[0] is: CONN_UMP_3MM_SMT"
Finally I want to see my hash key's values:
print "Hash value is currently: $symbols_and_data{$symbol_data[0]}\n";
that produces this:
"Hash value is currently: 6"
this appears to be the number of elements, rather than the values of
the elements.
I am expecting to see this:
"Hash value is currently: CONN_UMP_3MM_SMT, sym.req:0554,
lib.name:conn_ump_3mm_smt, height:3.00mm, used:01ATiss1/Whitney RF,
rev:2,NJH,26/05/04"
Sorry about the horrible Google formatting - I am looking into a proper
Usenet service...
Many thanks
Len
Please help, I can't figure out why my hash value not being
interpolated correctly?
code snippet:
begin
-------
@symbol_data = (CONN_UMP_3MM_SMT, sym.req:0554,
lib.name:conn_ump_3mm_smt, height:3.00mm, used:01ATiss1/Whitney RF,
(rev:2,NJH,26/05/04));
$symbols_and_data{$symbol_data[0]} = @symbol_data;
print "\$symbol_data[0] is: $symbol_data[0]\n";
print "Hash value is currently: $symbols_and_data{$symbol_data[0]}\n";
-------
end
description of problem:
I have the following array which has six elements:
@symbol_data = (CONN_UMP_3MM_SMT, sym.req:0554,
lib.name:conn_ump_3mm_smt, height:3.00mm, used:01ATiss1/Whitney RF,
(rev:2,NJH,26/05/04))
So far so good, I then dynamically declare and assign a hash key:
$symbols_and_data{$symbol_data[0]} = @symbol_data; #Create a Hash with
symbol name as key and data as value
Then I want to check a value:
print "\$symbol_data[0] is: $symbol_data[0]\n";
that produces this:
"$symbol_data[0] is: CONN_UMP_3MM_SMT"
Finally I want to see my hash key's values:
print "Hash value is currently: $symbols_and_data{$symbol_data[0]}\n";
that produces this:
"Hash value is currently: 6"
this appears to be the number of elements, rather than the values of
the elements.
I am expecting to see this:
"Hash value is currently: CONN_UMP_3MM_SMT, sym.req:0554,
lib.name:conn_ump_3mm_smt, height:3.00mm, used:01ATiss1/Whitney RF,
rev:2,NJH,26/05/04"
Sorry about the horrible Google formatting - I am looking into a proper
Usenet service...
Many thanks
Len