Now, perhaps you can explain why my attempt to use it doesn't work?

I think its because DATA and *DATA arent filedescriptors (int fd). In order to make that work you have to get the fd for the perl filehandle. The way I understand it is you have three handles, the perl level one, the unix file descriptor one, and the win32 handle under that. Im not sure if (or rather to what extent) the unix level one is supported by the Win32 API and what is provided by perl for portability reasons, but obviously the win32 handle one doesn't exist on UNIX at all.

Bear in mind i havent inspected the code before replying to this, so its just conjecture based on recollection.

---
$world=~s/war/peace/g


In reply to Re^4: Why no LockFile() in Win32API::File ? by demerphq
in thread Why no LockFile() in Win32API::File ? by renodino

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.