You have to work with Windows, and you know that stat() doesn't give you the information that you need. So why don't you tell us that fact in your original posting? How should anyone be able to know that you are not the ten millionth newbie trying to read a directory by invoking dir, ls or the like, if you don't tell us?

Apart from that, I doubt that invoking dir /q is reliable. At least on my german WinXP, it cuts off the account name and appends the file name, without any white space to split on:

C:\WINDOWS>dir /q
 Datenträger in Laufwerk C: ist System
 Volumeseriennummer: CC40-C624

 Verzeichnis von C:\WINDOWS

21.04.2010  17:44    <DIR>          VORDEFINIERT\Administra.
21.04.2010  17:44    <DIR>          VORDEFINIERT\Administra..
23.04.2010  09:20                 0 VORDEFINIERT\Administra0.log
27.03.2009  09:54    <DIR>          VORDEFINIERT\Administraaddins
03.05.2005  19:43            69.632 LUE-ABTEILUNG-1\user   Alcmtr.exe
04.05.2006  17:26         2.808.832 LUE-ABTEILUNG-1\user   alcwzrd.exe
28.02.2006  14:00            17.336 VORDEFINIERT\AdministraAngler.bmp
20.08.2009  17:44    <DIR>          VORDEFINIERT\AdministraAppPatch
06.11.1999  16:36            40.960 LUE-ABTEILUNG-1\Foken  Binary.scr
28.02.2006  14:00             1.272 VORDEFINIERT\AdministraBlaue Spitzen 16.bmp
21.09.2009  11:47            80.896 LUE-ABTEILUNG-1\Foken  cadkasdeinst01.exe
13.02.2003  12:21             7.698 LUE-ABTEILUNG-1\Foken  cadx2.ini
14.09.2009  09:33             7.603 VORDEFINIERT\Administracfgall.ini
28.02.2006  14:00            82.944 VORDEFINIERT\Administraclock.avi
24.08.2009  12:08               468 LUE-ABTEILUNG-1\Foken  Cmousecc.ini
27.03.2009  09:30               373 VORDEFINIERT\Administracmsetacl.log

I think your best bet is to find some Win32 API function that gives you the required information, and invoke that function. Perhaps someone has already written a module for that, in the worst case, you need to use Win32::API or write an XS.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^3: How to get filesystem ownerships by afoken
in thread How to get filesystem ownerships by Anonymous Monk

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.