[英]How to i get the difference of time in hours for a file created time and the current time using perl
如何获取文件创建时间与当前时间(以小时为单位)之间的时差
stat($file)->mtime
gives you the last modification time in seconds. stat($file)->mtime
为您提供最后的修改时间,以秒为单位。 Subtract that from time
and divide it by 3600 ... that should do the trick. 从time
减去该值,然后除以3600 ...应该可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.