Will there be some shorter-hand way to say these?
@a = @grades[grep $_ >= 90, @grades];
@b = @grades[grep 80 <= $_ < 90, @grades];
@c = @grades[grep 70 <= $_ < 80, @grades];
Granted, it's fairly compact as it is but I'm wondering if there's
some way to not have to mention @grades twice per statement.
Something like:
@a = @grades[$^_ >= 90];
@b = @grades[80 <= $^_ < 90];
@c = @grades[70 <= $^_ < 80];
BTW, is there some other name for these things? I only know to call
them "list comprehensions" from python. I've used the concept in
other languages as well but never was it named.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]