Re: converting between time and string

2006-06-22 Thread Mark Harris
bnj.s wrote: Hello, I have a file with lots of times in the format "01:22:33,456", where the numbers after the comma represent the milliseconds. I would like to reduce all these times by a given offset. I first thought to convert the string to a sort of date format, and then to do a minus o

Win32 - determining if a file is a directory

2006-06-23 Thread Mark Harris
On a windows xp machine, running the following code with active state perl 5.8.8: use Win32::File; $dirspec = "c:\\xfer"; opendir(DS, $dirspec); while($fn = readdir(DS)) { if ( -d $fn) { print "$fn is a directory\n"; } else { print "$fn is not a directory\n";