my @loc = ($offset, $length); my $part = substr $string, @loc;