#!/usr/bin/perl use Win32::DriveInfo; ($VolumeName, $VolumeSerialNumber, $MaximumComponentLength, $FileSystemName, @attr) = Win32::DriveInfo::VolumeInfo('c'); print "$VolumeSerialNumber";