Hey,

Thanks a ton. The method that I was using was disturbing the formatting, but this did the trick.

-Cheers.

Rob Dixon wrote:

I don't really like providing 'instant solutions', but I'm feeling too lazy
to help you to your own solution! This should do the trick, with the
disclaimer that I haven't tested it in any way.

open INP, "< inp.txt";
open OUT, "> out.txt";

printf OUT "%-10s%s\n", reverse split while (<INP>);

close OUT;
close INP;

HTH,

Rob


"Ashutosh Jog" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Folks,

I am wokring on a script which at one point works on a txt file. The

file's

format is as under:

40 abc
35 def
28 ghi
17 jkl
08 mno


What I want to do is take the column on the right and shift it entirely to
the left and take the column on the left and move it to the right. So the
file should ultimatly look like:

abc 40
def 35
ghi 28
jkl 17
mno 08

Any ideas how I can do so in perl? Any help is welcome.

Thanks in Advance.

-Cheers.






Reply via email to