in reply to Refining my Program

timtowtdi - and you should have checked you could open to write! ;-)

#!/usr/bin/perl -w use strict; my $output; open(TEST, 'test.txt') || die "Couldn't open it"; while (<TEST>) { chomp; $output .= sprintf("%s %s\n", (split /,/)[1,0] ) ; } close(TEST); open(TEST, '>test.txt') || die "Couldn't open it"; print TEST $output; close(TEST);

(s)printf tutorial here.

cLive ;-)

--
seek(JOB,$$LA,0);