NetDiver030
Programmer
ok .. here a little challenge ..
%bla->{"key1", "keya"} = "a";
%bla->{"key1", "keyb"} = "b";
%bla->{"key2", "keyc"} = "c";
%bla->{"key2", "keyd"} = "d";
looping through all alvailable keys is easy.
while(($k,$v)=each(%bla)) {...}
Does anyone know a smart way to loop only through all keys, that have "key2" in the first place without looping through all data sets and splitting the line of keys ?
the output should be
c d
and a loop count should be 2 not 4.
(As you can imagine I have to process more than 4 data sets ;-) )
All the best ...
Marco
%bla->{"key1", "keya"} = "a";
%bla->{"key1", "keyb"} = "b";
%bla->{"key2", "keyc"} = "c";
%bla->{"key2", "keyd"} = "d";
looping through all alvailable keys is easy.
while(($k,$v)=each(%bla)) {...}
Does anyone know a smart way to loop only through all keys, that have "key2" in the first place without looping through all data sets and splitting the line of keys ?
the output should be
c d
and a loop count should be 2 not 4.
(As you can imagine I have to process more than 4 data sets ;-) )
All the best ...
Marco