ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
3.2.181 unlinkunlink This function deletes a list of files.[11]
If
$cnt = unlink 'a', 'b', 'c'; unlink @goners; unlink <*.bak>; Note that unlink will not delete directories unless you are superuser and the -U flag is supplied to Perl. Even if these conditions are met, be warned that unlinking a directory can inflict Serious Damage on your filesystem. Use rmdir instead. Here's a very simple rm command with very simple error checking: #!/usr/bin/perl @cannot = grep {not unlink} @ARGV; die "$0: could not unlink @cannot\n" if @cannot; |