open (FHDLR, "< :raw", "$fname") or die ("Cannot open $fname!\n"); # Opens the file in binary mode. seek (FHDLR, 258, 0); # zero onto FORMAT_TYPE of partition $ftype = ord (getc (FHDLR)); # just get the FORMAT_TYPE variable