in reply to Lose first element of hash in hash ..

....besides the fact that most of your variables are not defined?

use strict; use warnings; use 5.010; my $th = 'hello-10-world-20'; my %things = split /-/, $th; while ( my($key, $val) = each %things ) { say "$key => $val"; } --output:-- hello => 10 world => 20

What do you consider to be the 'first' key/value pair in a hash?