splice @{ $graph{$u} }, $index, 1; shift @{ $graph{$v} };