#!/usr/bin/perl open(GG,"getall.txt"); $dest="/home/test/files/"; $targ="/home/new/newfiles/"; while () { ($first,$second,$third)=split(/\./,$_); print "first: $first second: $second third: $third \n"; my $dest_file = $dest . $_; my $target_file = $targ . "gotit.$second.$third"; system (`cp $dest_file $target_file`); } close(GG);