s_isblk#

True if a stat-mode value names a block-special device.

Synopsis#

my $mode = (stat "/dev/sda")[2];
print "block device\n" if S_ISBLK($mode);

Returns 1 when $mode & S_IFMT == S_IFBLK, 0 otherwise. With no argument, returns 0.