Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^5: array refernce as hash value

by Anonymous Monk
on Jul 22, 2009 at 11:49 UTC ( [id://782266]=note: print w/replies, xml ) Need Help??


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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^6: array refernce as hash value
by Corion (Patriarch) on Jul 22, 2009 at 11:54 UTC

    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.

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://782266]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-23 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found