D
Dayton
I can't determine what I am doing wrong. I get to this point in my program
but my subroutine &S_print_sls_detail doesn't work. I have all my
variables decalred also my split command seems to work properply.
I took that while statement piece of code and ran it by itself and printed
the
variables. That worked fine. But when I try to put it into a table and a
subroutine I get nothing. Also when I display my page I get my
&S_sales_heading
below my &S_print_inv_wrapup. Not what I expected.
Any help or direction I can get would be greatly appreciated.
T.I.A.
$f_dtype = $q->param("f_dtype");
if ($f_dtype eq "S") {
open(FH_Sales,$fn_sal_file);
&S_sales_heading(); #display Sales
heading
while (defined($p_line = <FH_Sales>)) {
chomp($p_line);
($pn,$qty,$unit,$desc) = split(/\|/,$p_line);
&S_print_sls_detail();
}
&S_print_inv_wrapup();
close(FH_Sales);
} else
###########################################################
sub S_print_sls_detail {
###########################################################
print "<tr">\n";
print "<td>$pn</td>\n";
print "<td>$desc</td>\n";
print "<td>$unit</td>\n";
print "<td>$qty</td>\n";
print "</tr>";
}
but my subroutine &S_print_sls_detail doesn't work. I have all my
variables decalred also my split command seems to work properply.
I took that while statement piece of code and ran it by itself and printed
the
variables. That worked fine. But when I try to put it into a table and a
subroutine I get nothing. Also when I display my page I get my
&S_sales_heading
below my &S_print_inv_wrapup. Not what I expected.
Any help or direction I can get would be greatly appreciated.
T.I.A.
$f_dtype = $q->param("f_dtype");
if ($f_dtype eq "S") {
open(FH_Sales,$fn_sal_file);
&S_sales_heading(); #display Sales
heading
while (defined($p_line = <FH_Sales>)) {
chomp($p_line);
($pn,$qty,$unit,$desc) = split(/\|/,$p_line);
&S_print_sls_detail();
}
&S_print_inv_wrapup();
close(FH_Sales);
} else
###########################################################
sub S_print_sls_detail {
###########################################################
print "<tr">\n";
print "<td>$pn</td>\n";
print "<td>$desc</td>\n";
print "<td>$unit</td>\n";
print "<td>$qty</td>\n";
print "</tr>";
}