Win98 is much like Unix1 here. If you delete a file while a process has it open, then the directory entry for the file is removed but the contents of the file (and the FAT2 or similar entries for the file) hang around until the last process to have the file open closes it.

Win98 is different from Unix in couple of ways that are related to this. First, when you open a file in Win98, you specify whether you want other processes to be able to read, write, and/or delete the file while you have it open. The "default"3 is to not allow any of this "sharing". But when using the C RTL4 (as Perl does) the default is to allow all sharing.

Secondly, Win98 doesn't support a file system that allows multiple directory entries per file5 (like most Unix file systems do). This is only tangentially related -- deleting a "hard link" for a file also doesn't delete the file contents just like deleting an open file doesn't.

1 Yes, I know it is officially "UNIX", but I just prefer "Unix" and always will. Tough noogies. q-:
2 File Allocation Table
3 I shy away from calling it a real default because you have to specify what type of sharing you want to allow, it is just much easier to specify no sharing (by specifying "0") than all sharing (by specifying FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE)
4 Run-Time Library
5 NTFS supports this, if in a rather awkward way

        - tye (but my friends call me "Tye")

In reply to (tye)Re: polymorphic perl by tye
in thread polymorphic perl by epoptai

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.