since $dest is a directory you are getting the error as that is your first argument passed to cp. -Enlil#!/usr/bin/perl open(GG,"getall.txt"); $dest="/home/test/files/"; $targ="/home/new/newfiles/"; while (<GG>) { ($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);
In reply to Re: Copying files
by Enlil
in thread Copying files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |