in reply to Cool example of list assignment usage

Very similarly, list assignment in scalar context is very useful for iterators.
while (my ($value) = $iter->()) { ... }

It allows the iterator to return false values without ending the loop.

Replies are listed 'Best First'.
Re^2: Cool example of list assignment usage
by blazar (Canon) on Jul 23, 2007 at 21:14 UTC

    Very good example, ikegami, and one people may not think of that easily, as well.