1

Getting this error when adding statement

use Time::HiRes qw( utime );

According to Time::HiRes perldoc it should be there, but it's not (looked in HiRes.pm). Does anybody know why? I am using perl 5.24.0, checked on several platforms (unix, win32). Trying to set high resolution timestamps on my files. Is there any other way?

Thank you!

AndyH
  • 383
  • 1
  • 8
  • 3
    What is `$Time::HiRes::VERSION`? First mention of `utime` in the [docs](https://metacpan.org/changes/distribution/Time-HiRes) is version 1.9735. – mob Aug 24 '17 at 19:11
  • 2
    My perl 5.24.0 comes with Time::HiRes v1.9733 and produces the same error as your headline. – mob Aug 24 '17 at 19:17
  • mob, same for me, 1.9733. Thank you for pointing out! – AndyH Aug 24 '17 at 19:28

1 Answers1

1

You are using a version of Time::HiRes that predates the addition of utime. I'm not sure of the exact version in which utime was added, but it was after 1.9733 (2016-04-23) and no later than 1.9739 (2016-06-28). Upgrade Time::HiRes if you wish to use utime.

ikegami
  • 367,544
  • 15
  • 269
  • 518