sub dive_val :lvalue { my $p = \shift; $p = \$$p->{$_} for @_; $p } dive_val($devstats, @data[4..$#data]) = $value;