use Devel::Size qw[ total_size ];; $a[$_] = '*'x4e6 for 0 .. 99;; print total_size \@a;; 400003052 sub change { my( $y, $x, $text ) = @_; substr $a[$y], $x, length $text, $text; };; print time(); change( int( rand 100 ), int( rand 4e6 ), 'test' ) for 1 .. 3e5; print time;; 1219523963 1219523963