S_IFMT is a bitmask, not a function. You're supposed to use it as:
printf "%s\n", $stat[2] & Fcntl::S_IFMT & Fcntl::S_IFLNK ? 1 : 0;
This outputs the expected 0 for me.
In reply to Re: Unexpected Fcntl::S_IFLNK behavior
by Corion
in thread Unexpected Fcntl::S_IFLNK behavior
by zdm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |