Hi,
I am planning to have a hash like
%hash = {g1 => [start_date1,end_date2]
g2 => [start_date1,end_date2]
};
but i dont have a unique value of g1 and g2..
i will get unique value with combination of some values like value1 value2 value3 ..value5
so i planned to derive g with concatenation of these values
assuming that a hash cannot have mutiple values of as a key.
I thik the background is explained better now. | [reply] [d/l] |
each hash like:
start => "some start date",
end => "some end date",
parm1 => "some data1",
parm2 => "some data2",
parm3 => "some data3",
| [reply] [d/l] |
Maybe I am wrong, but contrary to the others who have replied already, I think you are misinterpreting your problem (sorry if I misinterpreted you! :).
Do you want the following:
%hash = (
g1 => [value1, value2, value3],
g2 => [value4, value5, value6...]
);
i.e. do you want each key to have multiple values associated? If this is the case you need a reference to an array containing all the values (see perlref). You already have that situation in the example you give: g1 => [$start_date1,$end_date1], so, to concatenate more values, you will need a reference to an AoA (array of arrays). Again, sorry if I totally misinterpreted your problem, but if you think I am close, let me know and we will elaborate it a little more
| [reply] [d/l] [select] |
i think i am bad in explaining :(
my actaul issue with mutiple keys not values..
value i am laready refering to array.
But to get that hash value array i need a key which is combination of various values.
so i am stucked ....
| [reply] |