On Wed, 20 Nov 2002 [EMAIL PROTECTED] wrote: > join ', ', grep{ ($b.=$_) !~ /.{91}/ || ?.? && ($_ = 'etc.') } @names > that didn't work in my test, but it gave me an idea with map. I know, I used goto, but when I try to break from the BLOCK it says i'm not really in a block inside map, even when I set it up as a block like the POD shows.
@names = ( 'foo', 'bar', 'baz', 'boo', 'zor', ); $lim = 2; $i=0; map{$i++<$lim?push @n,$_:$i!=$lim?{push @n,'etc.' and goto FOO}:''}@names; FOO: $names = join ', ',@n; print "Names: $names\n";