Thanks *very* much for your answers; I still have a lot of work left
to do, it seems. But I'm still a little confused:
On Thu, Jun 07, 2001 at 06:08:23AM +1000, Damian Conway wrote:
> > Should properties interpolate in regular expressions? (and/or strings)
> Do you mean property look-ups via the pseudo-method syntax?
> In that case, yes they should
So, to match $foo's colour against $bar, I'd say
$bar =~ /$foo.colour/;
Great, but how do I match $foo followed by any character followed by the
literal "colour"? Would I have to use "\Q"?
> Err. I *would* expect sub call iterpolation in regexes, since they will
> interpolate in qq{...} contexts, and that's what a regex basically is.
Fair enough.
> /&bar($baz,$quux)/; # match interpolated value of call to
Ah, good. Much easier to parse.
> Just arrays, I believe.
Good, that's what was planning on.
> > print $a->{test2};
> die "Unexpected > after subtraction operation. Did you mean $a.{test2}???"
Urgh. OK, arrow is dead. That also makes things easier. Probably.
> > print "ok 5" unless ref ($a=(1,2,3))'
^^^^^^
> No. Equivalent to ref($a=3), I believe
Since ref($a=3) is undef, that should print "ok 5".
> > Oh, hrm. Shouldn't it be $a{test2}?
> Yes. Or $a.{test}
So "." isn't necessarily the "property" operator, then? OK.
Time to spend more quality time with YACC. :(
--
"If you want to travel around the world and be invited to speak at a lot
of different places, just write a Unix operating system."
(By Linus Torvalds)