On Wed, Nov 10, 1999 at 02:19:29PM -0500, Bennett Todd wrote: > 1999-11-10-13:30:18 tomr@aceldama.com: > > @cats = @cats[map (($_/2 + ($_ % 2) * $#cats/2), 0..$#cats)]; > > > > [...] Anyone else have comments? > > You are a sick little monkey. I like that. :-) Umm... thanks, I guess. > Seriously, this is something I frequently need to do, and I've never > seen such a lovely way of saying it. Next natural question would be, > does it keep working for ncols!=2. Looks to me like it does. So my > typical application would look more like [generic code snipped] > Well, that's creapy, it works. I'm still not perfectly sure why nrows doesn't > need to be rounded up. That's an interesting point. I was worried about until I found that it didn't seem to be necessary :) > Anybody know an elegant way to do multicolumn output the way ls(1) > does, with the column padding dependant only on the widths of the > elements that end up in those columns? My ls(1) doesn't do that - all of the columns are the same width. Tom -- -- Tom Rathborne tomr@aceldama.com -- http://www.aceldama.com/~tomr/ -- "I seem to be having tremendous difficulty with my life-style." ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe