Data::ParseBinary::FileSystem::MBR - Parsing the partition table
use Data::ParseBinary::FileSystem::MBR qw{$mbr_parser}; my $data = $mbr_parser->parse(CreateStreamReader(File => $fh));
Can parse the binary structure of the MBR. (that is the structure that tells your computer what partitions exists on the drive) Getting the data from there is your problem.
This is a part of the Data::ParseBinary package, and is just one ready-made parser. please go to the main page for additional usage info.
To install Data::ParseBinary, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::ParseBinary
CPAN shell
perl -MCPAN -e shell install Data::ParseBinary
For more information on module installation, please visit the detailed CPAN module installation guide.