File::stat is placing the output into $dev as an anonymous array I believe.
If I access your data as

foreach ( @$dev ) {
   printf "%-s;", $_;
 }

        I think the above is giving you the data you want.

Wags ;)
>  -----Original Message-----
> From:         Riva [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, March 12, 2001 11:55
> To:   [EMAIL PROTECTED]
> Subject:      stat problems
> 
> In the code below, I'm trying to store the information returned by stat in
> several variables.  When I run it, I get:
> 
> file c:\test\ftest5.pl updated at Mon Mar 12 12:09:09 2001
> File::stat=ARRAY(0xca9848)::::::::::::
> 
> This seems to indicate that the variables aren't being populated with
> stat's
> data. Any idea how/why stat works in this manner?
> 
> TIA!
> 
> 
> -------------------
> use strict;
> 
> use File::stat;
> use Time::localtime;
> 
> my ($date_string, $myfile);
> $myfile='c:\test\ftest5.pl';
> 
> $date_string = ctime(stat($myfile)->mtime);   #atime=last access,
> mtime=last
> modify, ctime=last inode change
> print "file $myfile updated at $date_string\n";
> 
> my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
> $atime,$mtime,$ctime,$blksize,$blocks);
> ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
> $atime,$mtime,$ctime,$blksize,$blocks) = stat($myfile);
> 
> print $dev, ":", $ino, ":", $mode, ":", $nlink, ":", $uid, ":", $gid, ":",
> $rdev, ":", $size, ":",  $atime, ":", $mtime, ":", $ctime, ":", $blksize,
> ":", $blocks;
> 
> -------------------
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> .
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to