my $de = DataExtract::FixedWidth->new({ heuristic => \@tuples , column_names => [qw/foo bar baz/] }); foreach my $tuple ( @tuples ) { state $row; my $hash = $de->parse_hash( $tuple ); given ( ++$row ) { when ( 1 ) { say $hash->{foo} } when ( 2 ) { say $hash->{baz} } } }