In https://stackoverflow.com/a/3220688/180275 the answer suggests that (after an open
) $^E
can be compared with 0x20 to determine if a file is being used by another process:
open ($fh, "<", "the-file");
if ($^E == 0x20) {
...
}
I have tried that and it works. However, if I print the value of $^E
I get a string (The process cannot access the file because it is being used by another process
).
How then is the comparison to a number still possible?
This is on Windows.