Jenda Krynicky [JK], on Wednesday, September 22, 2004 at 00:02 (+0200) made these points:
>> $values = 10; #how much values in result JK> many (taky si to furt pletu) :) thanks for correcting me. JK> Assuming $values does not get bigger than the number of items in the JK> list and $start is always <= the number of items in the list: these conditions are of course ok. JK> @list = (@list, @list); JK> @result = ( JK> @list[($start-$values/2-1) .. ($start-2)], JK> @list[($start) .. ($start+$values/2-1)] JK> ); very nice solution and easy to understand. Thanks a lot! First line is the key :) To others: sorry for my initial mail, maybe it was not clear, $start is in real middle position, only Jenda understood :) Thanks for all answers! -- ...m8s, cu l8r, Brano. [Unknown Error on Unknown Device for Unexplainable Reason] -=x=- Skontrolované antivírovým programom NOD32 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>