Re: Perl 6 index

2002-09-21 Thread William R Ward
I don't like changing the semantics without changing the syntax. There's too much of that in perl6 already. But shouldn't index() be a method of the string object anyway? --Bill. [EMAIL PROTECTED] (Aaron Sherman) writes: > Something that has long bothered me in C and Perl is the return from >

Perl 6 index

2002-09-17 Thread Aaron Sherman
Something that has long bothered me in C and Perl is the return from index. -1 is such a non-answer to me. In Perl 6, I was wondering if it would make sense for functions that return a count or index to set the truth property as well. For example, allowing: if index($subject,"**SPAM**")