The buddy is in roster and is online as well,and when i print $user i get 'use of uninitialized value'.
I tried dumping the results of %hash and its empty.
Comment on Re^2: Getting gtalk user status using Net XMPP
I see two things to try, install DAPATRICK/Net-XMPP-1.02_04.tar.gz ( cpanp i DAPATRICK/Net-XMPP-1.02_04.tar.gz ) and test again. If problem persists, report bug upstream :)