I guess it would have helped to include the area where I have the use File::stat... sigh. I did not want to post all 200+ lines of my script. In the code below I have the use statement from the original script as well as a copy of the variable I am passing in and the call itself. I hard coded the dir name until I get this piece working. I still get the "The dirfd function is unimplemented at DirStat.pl line 10."

#use File::stat; my $_checkDir = "c:\\drivers"; &DirCheck($_checkDir); sub DirCheck { my $_dir = $_[0]; opendir(my $dh, $_dir) or die "Can't open directory $_dir: $!\n"; my $_dirStat = stat($dh) or die "Can't stat directory $_dir: $!\n"; closedir($dh); print "Directory: $_dir\n"; for my $field (qw( dev ino mode nlink uid gid rdev size atime mtime ctime blksize blocks )) { print "$field: ", $_dirStat->$field(), "\n"; } my $_mtime = $_dirStat->mtime; print "Last Modified Time for $_dir: $_mtime\n"; }

In reply to Re^4: Stat not returning values for a directory on Windows XP by scott_shea
in thread Stat not returning values for a directory on Windows XP by scott_shea

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.