Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: directory printing

by bart (Canon)
on Dec 10, 2006 at 09:39 UTC ( [id://588888]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://588888]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2024-04-25 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found