in reply to split every second word
Well, I'm not entirely sure about the nature of your text. If it is in a file, one name to each line like you say it is (well you say that they basically are):
then you can simply open the file and read it into an array like this:Bob Builder Tinky Winky etc.
my @names = <FH>
If they are all on one line like your example, it is a bit trickier. But, since this seems like it might be a homework problem, I'll have you figure it out.
Update Well, I guess I misread your original post. You left out the to in got to put them on separate lines. Don't mind me.
|
|---|