I dont understand this Help me to fix issue where i struck with.
but im going to guess its at
print $fh_out '<a href="'.$outfile{$word}.'">';
that you are having problems. $outfile is a scalar my $outfile = "$dir/$root.html"; and not an hash so you can t"address into" it with {$word}. Now in $outfile also contains a filesystem name and not a http url. It is quite possible to change $outfile into a uri by knowing your web-server-root directory and changing that subsection at the beginning of $outfile to "http://some.server.name/", or just removing it and creating a relative (to the webserver) uri. But $outfile in itself is not a valid uri.
But even then $outfile is the file you are writing to now, so i find it kinda hard to believe you want a hyperlink to the same webpage you are on now. Maybe you want to hyperlink to another section with a "#subpart" reference, or maybe you want to link to some other page than the one you are on now. But you still have not said where it is you want to link to.
So, if you are printing what is contained in $word into the first column, just where is it that you want to link to. is it based on what is in $word (SL.NO)? Is it based on what goes into the columns CHECKLIST ITEM, or VALUE, or COMMENTS, or CONFIRMATION? if you can tell me what is the uri you want to link the row to, i can explain what to change $outfile{$word} to. If you can construct a variable containing a valid url, like my $href="http:/some.server.name/$part1/$part2/$part3"; replaceing $part1, $part2, $part3 with some combination of $dir, $root, $ext, $data[0], $data[1], $data[2], $data[3],$data[4] just code it before the my $check=0; line and change print $fh_out '<a href="'.$outfile{$word}.'">'; to print $fh_out '<a href="'.$href.'">';
and if that is all of your code, you are still have a lost </table>. i do see the <table> table and <th>...</th> header tags, but you should close your table too. It is nice to close the body and html tags as well, but less required. An unclosed table tag can present an error condition at times.
But i am not a mindreader and i still dont know where you want to link to because you have not told me yet. |