Hi, Umesh T G <[EMAIL PROTECTED]> wrote: > Below is my index.pl
Some comments: > #!/usr/bin/perl # consider using -T fpr taint mode use strict; use warnings; # consider using the CGI module, too. > use Env; > print "Content-Type: text/html\n\n\n"; One \n too many. > chdir("/path/to/dir"); Always check the return value of a syscall. > @files=`ls -1`; ## load all the html files.. > > print "<html>\n"; > print "<head>\n"; > print <<END_SCRIPT; > <script> > function submit_form() > { > document.show_files.submit(); > setTimeout(\"document.show_files.reset()\",3); > } > </script> > END_SCRIPT You should really put all static parts of your page into a here document instead of mixing here documents and extra print statements. Also the escapes for the double-quotes are not necessary. > print "</head>"; > print "<body>\n"; > print "<FORM NAME=\"show_files\" ACTION=\"display.pl\" METHOD=\"POST\" > target=\"_blank\" onsubmit=\"submit_form()\" >"; print "<p>\n</p>"; That would also enable you to use quotes freely instead of having to quote them. In any case, you should look up the qq() operator. [...] > This is my display.pl file... > > > #!/usr/bin/perl > > &parse_form_data (*simple_form); use CGI; instead. HTH, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>