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] |