udat before:
[- @ks = grep (!/^_/, sort (keys %udat)) ; $num = keys (%udat) - $#ks - 1 ; -]
[+ $ks[$row] +][+ 0+$udat{$ks[$row] || ''} +]
[+ $num > 0?"ok (num=$num)":"Not a session hash (num=$num)" +]

$mdat{cnt} = -[+ 0+$mdat{cnt} +]-
$udat{cnt} = -[+ $udat{cnt} +]-
[- $_[0] -> DeleteSession (1) ; -] udat after:
[- @ks = grep (!/^_/, sort (keys %udat)) ; $num = keys (%udat) - $#ks - 1 ; -]
[+ $ks[$row] +][+ 0+$udat{$ks[$row] || ''} +]
[+ $num > 0?"ok (num=$num)":"Not a session hash (num=$num)" +]

[+ $udat{b} = 2 +] udat after write:
[- @ks = grep (!/^_/, sort (keys %udat)) ; $num = keys (%udat) - $#ks - 1 ; -]
[+ $ks[$row] +][+ 0+$udat{$ks[$row] || ''} +]
[+ $num > 0?"ok (num=$num)":"Not a session hash (num=$num)" +]