in reply to Re: directory printing
in thread directory printing

You're hoping that the filenames don't contain special characters for HTML, thus "&" and "<". Granted, for filenames it's not very likely ("<" is even impossible on Windows), but it's a kind of laziness I personally don't appreciate.

Replies are listed 'Best First'.
Re^3: directory printing
by McDarren (Abbot) on Dec 10, 2006 at 10:15 UTC
    Fair comment.

    If I was doing his myself, I'd almost certainly be using File::Find and CGI, and I'd probably do something like:

    print ("$_",br,"\n") for @files;

    I suppose I could have suggested this to the OP...

Re^3: directory printing
by converter (Priest) on Dec 10, 2006 at 16:15 UTC

    On Unix and Unix-like OSs any character except the path delimiter can be used in filenames, including characters that have special meaning in HTML (like [<>&]) and non-printing characters including CARRIAGE RETURN and NEWLINE. It's a good idea to HTML escape filesystem object names and, depending on the intended use, include some indication of the presence of non-printing characters where they occur.