http://qs321.pair.com?node_id=1136599


in reply to Re^2: CSV file info into xml tags
in thread CSV file info into xml tags

What about using this:

foreach my $t ( sort keys %sidHash ) { if ( scalar @{ $sidHash{$t}{state} } > 1 ) { print map { sprintf "%s: State %s rate: %s\n" => $t, $sidHash{$t}{state}[$_], $sidHash{$t}{rate}[$_] } 0 .. $#{ $sidHash{$t}{state} }; } else { print "$t: State ", join( ", " => @{ $sidHash{$t}{state} } ), " rate: ", join( ", " => @{ $sidHash{$t}{rate} } ), $/; }

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me