I have a really basic question that I have been milling over for a couple of hours now and I thought I had it, but I am not getting the results I wanted. I simply need to create a hash and then add data to it through multiple "while" type loops.
Here is what I have:... and that will print the $hash{key} pairs to the screen, but I don't think it is putting them into a hash called %hash.while ($WOW =~ m!<table id=.*?table.*?<a href=.*?><b>(.*?)</b></a></sp +an>.*?\(from (.*?)\)!sim) { $Uip = $1; $Uuser = $2; my %hash = (key => $Uip); $hash{key} .= $Uuser; print "$hash{key} \n";
I think the code above is messed up. Is there a better way to do this? How do I run through and print out the hash when I am done to validate that it is being popluated?
I appreciate everyone's help.
Many thanks,
ghettofinger
In reply to Inserting data into a hash by ghettofinger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |