sub propogate { my($array, $from, $to) = @_; foreach (@$array) { foreach (@$_) { $_ = $to if $_ == $from; } } }