$block_size =~ m{([a-zA-Z]{2}$)} or die "I could not find the block type in the string '$block_size'"; $block_type = $1;