http://qs1969.pair.com?node_id=380839

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello everyone, I have an output of a command in this format,
log1 123 log1 233 log1 223 log2 465 log2 231 log2 456
I need help to put the above output like this
log1 123 233 223 log2 465 231 456

Edited by davido: Used code tags so that Anonymous Monk's post would show the crucial tabular format which is lost without the use of proper HTML formatting tags.