develooper Front page | perl.beginners | Postings from December 2002

Need to change file columns

Thread Next
Ashutosh Jog
December 21, 2002 07:34
Need to change file columns
Message ID:

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.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About