Could be, I guess, but a quick strace shows it does call 'stat' to get the permissions. But I guess that, on it's own, doesn't tell if the root is squashed or not, so there's no way for perl to know.
That's exactly right, there's not enough information for Perl or the OS to know. The simplest solution is to just try and open the file and see if it fails with a "permission denied" error.