my @items = unpack "...", $string; my @first = splice @items, 0, 20;