I have started learning perl and like to try out new things.
I have some problem in text processing. I have some text of the form,
0 1 2 3 4 5 6 7 8
There certainly is, and Mike has pointed out the simplest way. If you are learning, you probably want to write your own function?
First, you want to split each line on spaces to get an array of values (or push the list of words into the array, as in Dalton's answer; in Perl, there's always more than one way to do anything)
Then, for each element in the array, you want to print it and its counterpart in the second array onto the same line. (What will you do if one array runs out before the other?)
Of course, if you want to learn Perl, you will also definitely want to learn to use CPAN as well, so it's still worthwhile to try using Data::Pivot.