The unlink function deletes a list of files on both UNIX and Windows systems. : unlink « File « Perl






The unlink function deletes a list of files on both UNIX and Windows systems.

     

#Format

#unlink (LIST);
#unlink LIST;

unlink('a','b','c') || die "remove: $!\n";
$count=unlink <*.c>;
print "The number of files removed was $count\n";

   
    
    
    
    
  








Related examples in the same category

1.Delete a file
2.Delete every file whose name ends in .bak: