Hi all,
I am doing a silly mistake for which i need a second eye to look upon. Please help out.
Within inline IPL, i am reading an XML and collating the values into a string as key value pairs... which needs to be typecast into a hash. Somehow it is not working.
Option#1
In case i hard code my hash with a literal string assignment, it is working fine
%idValuePair = ("guest","Guest","first_time","First Time","return","Return User","logged_in","Logged In");
Option#2
When i read my key/value from XML and storing in array and then joining all to create a long string. It is not getting transformed in a hash.
for loop ----
my $idValue = $dtObject->getAttribute("id");
my $lblValue = $dtObject->getAttribute("label");
my $keyString = '"'.$idValue.'","'.$lblValue.'"';
push (
@idNameValues, $keyString);
---- end for loop
$hashString = join(",",
@idNameValues);
%idValuePair = ($hashString);
Any pointers???