< Perl Programming < Keywords

unlink deletes a LIST of files and returns the number of files successfully deleted. If it is unsuccessful, it it returns false and sets $! to the error number (errno).

Syntax

  unlink LIST

Example

my $unlinked = unlink 'a', 'b', 'c';
unlink @files;
unlink glob "*.pl";

See also

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.