http://www.perlmonks.org?node_id=1032867


in reply to Using pos() inside given/when

Use for() instead of given():

... for ( $h->{s} ) {... ...

Output:

1 3 5