Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: HELP! - trouble returning values

by Adam (Vicar)
on Sep 22, 2000 at 20:58 UTC ( #33657=note: print w/replies, xml ) Need Help??


in reply to HELP! - trouble returning values

Please wrap code in <code> code tags </code>

my $mailbox = $conn->getMailboxAvailablity ( DOMAIN => $UserDomainName MAILBOX_LIST => $UserLoginName)
if $mailbox is HASH(0x222b4c) then getMailboxAvailability() is returning a hash reference. You need to dereference it. The clearest way (but definately not the only way or even the best way... TIMTOWTDI) is like this:
my %dereferenced_hash = %{$hash_reference}; # of course, you can also access elements via the ref directly: print "yeah\n" if exists $$hashref{'key2'}; # or even print "insufficient\n" unless $hashref->{'balance'} > $request;
But your question is a bit vague so I'm not sure what you are asking. You didn't post a complete subroutine, so I don't know what's really going on. But at least I can tell you how to deal with HASH(0x222b4c)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2022-05-17 23:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (68 votes). Check out past polls.

    Notices?