#removing files chdir 'subdirtest/' or warn "Directory subdir/ not accessible: $!"; unlink <*.doc>; $erased = unlink 'a.txt', 'b1999.txt'; print $erased; #returns the number of files removed rename "c.txt", "c_change.txt";