in reply to Re^2: move() error
in thread move() error
See also Basic debugging checklistmy @bookNameArray; my $bookName; my @bookFileName; for(my $h = 0; $h < scalar(@bookFiles); $h++){ @bookNameArray = split(/_/ , $bookFiles[$h]); @bookFileName = split("/" , $bookFiles[$h]); $bookName = $bookNameArray[-2]; my $newdir = $dir . "/Book Chapter/" . $bookName; print "newdir >>>$newdir<<<\n"; mkdir($newdir) or die "cant mkdir $newdir: $!"; my $src = $bookFiles[$h]; print "src>>>$src<<<\n"; my $dst = $dir . "/Book Chapter/" . $bookName . "/" . $bookFileName +[-1]); print "dst>>>$dst<<<\n"; if (-e $src) { print "$src exists\n"; } else { print "$src does not exist\n"; } # same -e check for dst move($src, $dst) or die "cant move : $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: move() error
by JKasting (Novice) on Feb 27, 2010 at 21:08 UTC | |
by almut (Canon) on Feb 27, 2010 at 23:23 UTC | |
by Anonymous Monk on Feb 28, 2010 at 02:08 UTC |