I have a loop (for each entity in hash '%dep').
Inside that loop I am adding a variable to %dep2.
When I print off all values in %dep2, I only have 1 member of the hash. This isn't supposed to happen because %dep has a ton of members in it's hash. | [reply] |
Let's take it from the top:
my $mech = WWW::Mechanize->new();
my $stream = HTML::TokeParser->new(\$html);
my $streamm = HTML::TokeParser->new(\$htmll);
my $streammm = HTML::TokeParser->new(\$htmlll);
my %dep;
my %dep2;
my @coursename;
$mech->get($url);
$html = $mech->content();
You need to declare $html, $htmll, etc. prior to initializing $stream, $streamm, etc.
Fix that first, and update the code.
Please use strict; It would have caught undeclared variables.
Also heed the advice at: How do I post a question effectively? | [reply] [d/l] [select] |