Use for() instead of given():
... for ( $h->{s} ) {... ... [download]
Output:
1 3 5 [download]
In reply to Re: Using pos() inside given/when by Kenosis in thread Using pos() inside given/when by Anonymous Monk