in reply to split an array in two

This node was taken out by the NodeReaper on Thu Apr 28 17:22:27 2005 (EST)

Replies are listed 'Best First'.
Re^2: split an array in two
by kwaping (Priest) on Apr 28, 2005 at 16:46 UTC
    I think this is better, the one above gives an uninitialized value warning...
    sub split_array_in_two{ [@_[0..@_/2-1]], [@_[@_/2..@_-1]] }