in reply to Re^2: How to get filesystem ownerships
in thread How to get filesystem ownerships

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". ;-)