Answer to Question #25342 in Perl for Gina

Question #25342
sub GetNotReqdCourses {
local (*notreqd_courses) = @_ if @_;
my $query, @notreqd_info, $cmap_san, $item, $tp_san, $class_code, $reqd_flag;

$query = qq | select c.cmap_san, c.tp_san, c.class_code, c.reqd_flag
from hrtraindata.tp_course_map c
where c.reqd_flag = 'N'
|;

@notreqd_info = &GetDBInfo($query);
foreach $item (@notreqd_info)
{
($cmap_san, $tp_san, $class_code, $reqd_flag) = split(/\|/,$item,4);
$notreqd_courses{$tp_san}{$class_code}{'reqd_flag'} = $reqd_flag;
$notreqd_courses{$tp_san}{$class_code}{'cmap_san'} = $cmap_san;
}

}### end GetNotReqdCourses Can you explain what happens after foreach. what are those 3 lines doing? I think the first line | those 4 items, but not sure about last two lines
0
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS