On 2/11/08, Michael Barnes <[EMAIL PROTECTED]> wrote:
> I thought about using lstat to get the size of a file for file
> comparisons.  I see that lstat always returns a list of thirteen values.
>  The references I find appear to require assignment of those 13 values
> to variables, even though I only want to use one.
>
> Do I really have to put
>
> ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
>      $atime,$mtime,$ctime,$blksize,$blocks)
>            = lstat($filename);
>
> Just to get the $size variable populated with the file size?

You can put in an "undef" in place of any variable you don't want, and
I believe you can omit trailing "undef"s.

-- 
Mark Wagner

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to