in reply to Re: Ordered Directory Listing CGI
in thread Ordered Directory Listing CGI

(-d) ? b(a({href=>"$_"},"[ $_ ]")) : a({href=>"$_"},"$_");
You're failing to escape the HTML for your directory and filenames. This can lead to weird things when people have filenames like <b>. Simply import escapeHTML, and add that in the appropriate places:
(-d) ? b(a({href=>"$_"},escapeHTML("[ $_ ]"))) : a({href=>"$_"},escape +HTML($_));

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.