Front page | perl.perl6.language |
Postings from June 2001
Re: Coupla Questions
Thread Previous
|
Thread Next
From:
Graham Barr
Date:
June 6, 2001 14:16
Subject:
Re: Coupla Questions
Message ID:
20010606221446.H50444@pobox.com
On Thu, Jun 07, 2001 at 06:37:26AM +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)/;
Graham.
Thread Previous
|
Thread Next