I think you need something more like the below:
use File::Monitor;
use File::Monitor::Object;
my $wFileMonitor = File::Monitor->new();
$wFileMonitor->watch($wFile);
#-- First scan does nothing
$wFileMonitor->scan;
#-- Let's sleep so changes can happen
sleep 10
#-- Subsequent calls will report changes
my @changes = $wFileMonitor->scan;
foreach my $object (@changes) {
my $modified = $object->mtime;
}
Since you're only monitoring one file I guess you'll get either 0 or 1 objects back from scan depending on whether the file changed or not.
Objects are of class File::Monitor::Delta as shown in the docs.