Answer to Question #25342 in Perl for Gina
2013-02-27T16:06:01-05:00
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
Answer in progress...
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 !
Learn more about our help with Assignments:
Perl
Comments
Leave a comment