in reply to get the size of a special device (drive)
If all else fails, you could try seeking to the end of the 'file' using the end-relative seek mode:
open DEV, '<+:raw', '/dev/sda4' or die ... my $size = sysseek DEV, 0, 2; [download]