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

Need to change file columns

Thread Next
From:
Ashutosh Jog
Date:
December 21, 2002 07:34
Subject:
Need to change file columns
Message ID:
3E041916.4070906@pdf.com
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.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About