Well, actually, it does (or if you wanna be anal, it depends). Please don't spread misinformation

from perldoc -f

unlink LIST
unlink  Deletes a list of files. Returns the number of files
        successfully deleted.

            $cnt = unlink 'a', 'b', 'c';
            unlink @goners;
            unlink <*.bak>;

        Note: "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 damage on your filesystem. Use "rmdir" instead.

        If LIST is omitted, uses $_.
from perlport

Don't unlink or rename an open file.

Don't assume that a single unlink completely gets rid of the file: some filesystems (most notably the ones in VMS) have versioned filesystems, and unlink() removes only the most recent one (it doesn't remove all the versions because by default the native tools on those platforms remove just the most recent version, too). The portable idiom to remove all the versions of a file is

    1 while unlink "file";
This will terminate if the file is undeleteable for some reason (protected, not there, and so on).

Some operating systems don't have links at all.


In reply to Re: Re: Re: unlink Question by Anonymous Monk
in thread unlink Question by lisaw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.