sub mv_files{ my ($file,$disc)=@_; print "moving $file to disc$disc/$file\n"; if ($doit == 1) { print "truely moving $file to disc$disc/$file\n"; move($file, "disc$disc/$file") or warn "move $file to disc$disc/$file failed: $!\n" } }