From: oldgeezer <[EMAIL PROTECTED]>
> But you also made me aware of a mistake
> I always made until now. The three periods in
>      for (x...y)
> I must have inherited that error from
> another language. Probably from an
> interpreter I wrote myself some 30
> years ago.

It's not an error. Just something that might surprise the people that 
know about .. , but not about ...

In this case both operators work exactly the same.

See the Range Operators section in perlop manpage (run perldoc 
perlop). The .. and ... only work differently in scalar context and 
the only difference is that using ... whenever the first operand 
evaluates to true, the whole operator returns true at least once.

In either case I think I've used .. in scalar context maybe twice.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to