Now you can pass a scalar reference as the first argument and it will used as the recursive flag when removing directories. With recursive flag set to 0 only the files in the directory are removed and no attempt is made to recurse into subdirectories. Nevertheless, if the directory becomes empty it is removed.