in reply to Inserting data into a hash
Well, you're redefining your hash every time you are in the loop, so it's local to the loop. And you're also using a string "key" to be the key. What do you want to be the key? Uip? and the value to be Uuser? If so...
my $hash; while ($WOW =~ m!<table id=.*?table.*?<a href=.*?><b>(.*?)</b></a></sp +an>.*?\(from (.*?)\)!sim) { $Uip = $1; $Uuser = $2; $hash{$Uip} = $Uuser; ... } foreach my $key ( keys %hash ) { print "$key is Uip and $hash{$key} is Uuser\n"; }
--------------
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."
In Section
Seekers of Perl Wisdom