Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Inserting data into a hash

by RazorbladeBidet (Friar)
on Apr 15, 2005 at 17:00 UTC ( #448262=note: print w/replies, xml ) Need Help??

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."

Replies are listed 'Best First'.
Re^2: Inserting data into a hash
by ghettofinger (Monk) on Apr 15, 2005 at 17:22 UTC
    I appreciate your help.
    Thank you very much.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://448262]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2020-10-27 18:22 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (257 votes). Check out past polls.