my @coursename; my @c_arr ;# Course array $mech->get($url); $html = $mech->content(); $stream->get_tag("option"); while(my $token = $stream->get_token()){ my $check = $token->[2]{name}; if($check eq "dept[]"){ while(my $token = $stream->get_token('option')){ #### THE LINE BELOW TRIGGERED THE FOLLOWING MSG #### #### Use of uninitialized value in string eq #### if($token->[1] eq "option"){ $course_num = $token->[2]{value}; $department = $stream->get_trimmed_text(); $dep{ $course_num } = [$department]; } } } } #### # value surrounded with < > to make it easier to see # empty strings print STDERR "token[1]=<" . (defined($token->[1]) ? $token->[1] : 'undef') . ">\n";