#!/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"; system (`cp $dest $_ $targ`); } close(GG);