Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: undefined value as a HASH reference??

by knobunc (Pilgrim)
on May 16, 2001 at 18:48 UTC ( #80911=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: undefined value as a HASH reference??
in thread undefined value as a HASH reference??

Is it possible that the Range("A6") call is returning undef? Hoewver, that does not explain why it works after you assign it to a scalar. Perhaps the thing returned by Range() is a tied hash? Can you print out the result of the following:

my $range = $Sheet->Range("A6"); print STDERR "Ref: ", ref($range), "\n"; print STDERR "Tied: ", tied($range), "\n";

-ben


Comment on Re: Re: Re: undefined value as a HASH reference??
Download Code
Re: Re: Re: Re: undefined value as a HASH reference??
by ryddler (Monk) on May 16, 2001 at 19:19 UTC
    I did you one better and added print STDERR "Range:  $range\n"; into the mix. Here's the output:
    Range: Win32::OLE=HASH(0x245b554) Ref: Win32::OLE Tied:

    Update: Further investigation shows that wrapping an eval around the hash like so:

    $Sheet->Range("A6")->{'Value'} = eval { $var_ref->{results}{'Legal'} +};
    Also executes without error.

    ryddler

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-07-24 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls