while (1) { print $i++."\n"; $data{'test'}{'test'} = $i; sleep 1; }