Coincidentally, I just wrote a module the other day that uses source-filtering to implement the Ksh's select loop in Perl, plus more!
I'm going on vacation very shortly, but when I return in about two weeks, I'll be posting it to the CPAN.
It supports these obvious invocations:
select (LIST) { block; }
select $var (LIST) { block; }
select my|local|our $var (LIST) { block; }
I've also just about got an interactive map-filtering style working too:
LIST2 = select {block;} LIST;
I figure it doesn't make any sense to support the following, because it just reduces to map():
LIST2 = select /expr/, LIST;
I'm glad other people are thinking about this, and I'll look forward to sharing my code with you soon!
Tim Maher, "yumpy"
Consultix
tim@teachmeperl.com