} else { print "\nAll songs found matches! ^_^ \n";} print "Copying Files....\n\n"; print "0% 100%\n"; my $div; {use integer; $div=(scalar keys %moves) / 25 + 1 ;} my $i = 0; foreach $dir (keys %moves) { unless (defined $opt{s}) {dircopy("$dir","$moves{$dir}") or die("\n!: Couldnt copy \"$dir\" : $!\n");} print "." if (($i % $div) == 0); $i++; } #### All songs found matches! ^_^ Copying Files.... 0% 100% !: Couldnt copy "C:\Program Files\Stepmania CVS\Songs\Dance Dance Revolution 5th Mix\Abyss" : No such file or directory #### ... unless (defined $opt{s}) { print "it exists\n" if (-e $dir); #here print "its a dir\n" if (-d $dir); #and here dircopy("$dir","$moves{$dir}") or die("\n!: Couldnt copy \"$dir\" : $!\n"); ... #### ... All songs found matches! ^_^ Copying Files.... 0% 100% it exists its a dir !: Couldnt copy "C:\Program Files\Stepmania CVS\Songs\Dance Dance Revolution 5th Mix\Abyss" : No such file or directory