P
perlUSER
Hello,
I am writing Perl/CGI script to build a page listing the files in a
directory.
I am calling a sub routine to write a row:
This piece of code is working fine.
sub printFile {
$q->Tr(
$q->td({colspan=>1},
span {class=>"textmain"}, "someReport.pdf")
)
}
I made a change to print a row for each file in loop.
There is no effect with the following code:
sub printFile {
foreach my $file (sort {$a cmp $b} @list) {
$q->Tr(
$q->td({colspan=>1},
span {class=>"textmain"}, $file)
)
}
}
Please help me why this is not working.
Any help is greatly appreciated.
Thanks in advance,
Sri.
I am writing Perl/CGI script to build a page listing the files in a
directory.
I am calling a sub routine to write a row:
This piece of code is working fine.
sub printFile {
$q->Tr(
$q->td({colspan=>1},
span {class=>"textmain"}, "someReport.pdf")
)
}
I made a change to print a row for each file in loop.
There is no effect with the following code:
sub printFile {
foreach my $file (sort {$a cmp $b} @list) {
$q->Tr(
$q->td({colspan=>1},
span {class=>"textmain"}, $file)
)
}
}
Please help me why this is not working.
Any help is greatly appreciated.
Thanks in advance,
Sri.