Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by knobunc (Pilgrim)
on May 16, 2001 at 18:48 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://80911]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found