in reply to Re^5: array refernce as hash value
in thread array refernce as hash value

This site is not a program writing service. While we will gladly help you in solving actual problems you encounter with the code you've written, we will not write complete programs for you. If you show us your input data, the code you've written, your expected output data, and how the output your program produces differs from the output you want, we will try help you improve your program so it produces the output that you want.

So please, show some effort instead of plz help me in this also.

Replies are listed 'Best First'.
Re^7: array refernce as hash value
by Anonymous Monk on Jul 22, 2009 at 12:12 UTC
    I tried this way
    foreach $key (keys %{$MSISDN_ref}) { print MYFILE $key,"|",@{$MSISDN_ref -> {$key}, "\n"; }
    so i got the file as
    9344220001|sei10720013,21/07/2009-00-00-00,23/07/2009-12-34-44sei10720 +014,23/07/2009-20-00-23
    but i dont want this i want 9344220001|sei10720013,21/07/2009-00-00-00,23/07/2009-12-34-44 9344220001|sei10720014,23/07/2009-20-00-23 I dont how can i achive this
      I can see these issues with your code
      • There is a syntax error in the code. ‘}’ is missing in print statement.
      • Even with the syntax error fixed, the code will not print the array elements but the array refrences. Something like: ‘9344220003|ARRAY(0x23d0e84)ARRAY(0x23c298c)ARRAY(0x2454aa4)’
      $MSISDN_ref->{$key} is an AOA (array of array) so you need to loop over it and print the inner arrays separately.

      Regards,
      Ashish