M
Mike
I'm trying to format the data I have in a hash (or, I could throw it
into an array also) so I can produce a report.
I've attempted to throw that hash data into an array, but I'm not sure
how to arrange the data, because as it appears, the key would be $array
ofhash[0] and the value would be $arrayofhash[1] would be the value.
I'd like to throw a tab in between the matching keys and values. The
only problem I'm having is figuring out how to throw that into a loop,
so it extracts all the data, for example, lets say there are 150
elements ( $arrayofhash[150] ) in that array.
Or, if you are more skilled than me (most people are), how could I
format that data from the hash? I've been tinkering with printing the
values from hashes, but it seems like there is a lot of duplicated
data, for instance, I found the example of this to print all the values
I have in a hash, but it seems like it is a single array within the
hash repeating (not printing multiple items in hash):
while ( ($key,$value) = each %hash ) {
print "$key => $value\n";
}
However, when I copy all the hash data to an array, and print the
array, it doesn't show all the duplicated data.
Thanks for the help
Mike
PS
I've learned how to (and how not to) multi-post and cross-post in
google groups, sorry for previous questions asked the group.
into an array also) so I can produce a report.
I've attempted to throw that hash data into an array, but I'm not sure
how to arrange the data, because as it appears, the key would be $array
ofhash[0] and the value would be $arrayofhash[1] would be the value.
I'd like to throw a tab in between the matching keys and values. The
only problem I'm having is figuring out how to throw that into a loop,
so it extracts all the data, for example, lets say there are 150
elements ( $arrayofhash[150] ) in that array.
Or, if you are more skilled than me (most people are), how could I
format that data from the hash? I've been tinkering with printing the
values from hashes, but it seems like there is a lot of duplicated
data, for instance, I found the example of this to print all the values
I have in a hash, but it seems like it is a single array within the
hash repeating (not printing multiple items in hash):
while ( ($key,$value) = each %hash ) {
print "$key => $value\n";
}
However, when I copy all the hash data to an array, and print the
array, it doesn't show all the duplicated data.
Thanks for the help
Mike
PS
I've learned how to (and how not to) multi-post and cross-post in
google groups, sorry for previous questions asked the group.