....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?
In reply to Re: Lose first element of hash in hash ..
by 7stud
in thread Lose first element of hash in hash ..
by theantler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |