>  Though I'm making progress (thanks guys) I'm still having a problem
> with dereferencing the struct elements. I've re-read the section on
> References in Programming Perl and I thought what I was doing was
> correct, but I can't print out the values correctly. Here's a
> simplified version of what I'm trying to to:
> 
>    # dereference the hash method.
>    print "stock: %{$store->stock}";   ### <---FAILS! Prints out the
>    # ref again with a % in front...

1)  hashes do not interpolate in ""
2)  method calls do not interpolate in ""

> 
>    # What about the scaler reference?
>    # prints the reference.
>    print "owner: $store->owner";

method calls do not interpolate in quotes

       print "Owner: ", $store->owner;

>    # prints ref
>    # you want print "owner: ", $store->owner";
>    my $owner =  $store->owner;       ## This works.
>    print "owner: $owner";
> 
>    # but how do you print the store owner directly? The following fails!
>     print "owner:, ${$store->owner}";

I'll say it again:  Method calls do not interpolate inside quotes.

There *IS* a way (perldoc -q 'How do I expand function calls in a string' )
that is ugly as sin.  

> 
> Thanks in advance,
> 
> Ed
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to