$"='';$|=@C=map{int rand 10}1..pop;while(@C){@X=map{int rand 10}@C;print"@F@X\r";push@F,pop@C if$C[0]eq$X[0]} #### sub r{map{int rand 10}@_}$"='';$|=@!=r 1..pop;while(@!){@X=r@!;print"@F@X\r";push@F,pop@!if$![0]eq$X[0]}