in reply to Format lines in a File to be outputted in a different sequence

G'day markgoz,

Welcome to the monastery.

Your post is unreadable with respect to the format of your data (as already pointed out).

Your question is about formatting so the format of your data is clearly important: despite two requests (within minutes of you posting) to fix this, it would appear you've done nothing about this. Perhaps you need to read "How do I change/delete my post?".

You also make some vague reference to having tried different solutions: despite being asked to show your code, it appears you've nothing about this either.

The following may point you in the right direction:

#!/usr/bin/env perl -l use strict; use warnings; print join ' ' => (split)[1, 0, 3, 2] while <DATA>; __DATA__ a b c d e f g h i j k l

Output:

b a d c f e h g j i l k

If you want further help with this, please make some effort to help us to help you.

-- Ken