On Thu, Sep 14, 2000 at 07:49:32AM -0700, Nathan Wiger wrote:
> > >     print 'Today\'s weather will be '.join($", $weather->temp()).
> > >           ' degrees and sunny.';
> > >
> > > However if temp() calls wantarray(), the result will be FALSE (scalar).
> 
> I think what he's trying to get at is that these should all work the
> same:
> 
>    print "Here's some @stuff";
>    print "Here's some $h->{stuff}";
>    print "Here's some $r->stuff";

That may be, but I don't think calling it in one context, accepting another,
and lying about it all is the right way to go.  I think I'll let the author
try to explain what he had intended.


> > >     print 'There is '.$obj->foo(this => $yar, that => 2 + 2). ' in my head.";
> > 
> > Now perl is parsing full statements within strings.
> 
> This already happens with:
> 
>    print "Here's some $h->{$stuff}";
>    print "Here's some $a->[$stuff + $MIN]";
> 
> So it's not that confusing, and quite consistent.

Well, I still find it confusing (most probably because of the length of the
examples), but it is indeed consistent.  Stupid mistake on my part.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to