On Thu, Jun 07, 2001 at 07:43:55AM +1000, Damian Conway wrote:
>
> > > > So, to match $foo's colour against $bar, I'd say
> > > >
> > > > $bar =~ /$foo.colour/;
> > >
> > > No, you need the sub call parens as well:
> > >
> > > $bar =~ /$foo.colour()/;
> >
> > Hm, I thought Larry said you would need to use $() to interpolate
> > a method call. So this would be
> >
> > $bar =~ /$($foo.colour)/;
>
> That was not my understanding. At least not for (pseudo-)method calls.
But with the above you still have abiguity, for example what does this do
$bar =~ /$foo.colour($xyz)/;
I may be remembering about interpolation into strings as "$file.ext" is
going to be common. But I do think the $() approach is clean and
unambiguous
Graham.