in reply to Match and extract three characters from the middle of a string
my $emc_device = substr($inq, 2, 3); [download]
my ($emc_device) = $inq =~ /^..(...)/; [download]