Well, your second path doesn't end in a / which your code seems to require.
In reply to (tye)Re: Using File::stat by tye in thread Using File::stat by RayRay459