in reply to Re: stat only gives info on . & ..
in thread stat only gives info on . & ..

Hey, thanks I really appeciate the help. I was assuming stat would know to work on the current directory. This will go into an html doc so that's why you see the break tag. Cheers

Replies are listed 'Best First'.
Re^3: stat only gives info on . & ..
by ikegami (Patriarch) on Jan 18, 2007 at 19:28 UTC

    I was assuming stat would know to work on the current directory.

    stat does work on the current directory. Unfortunately, the files you are listing aren't in the current directory. They are in dir $dirname. . and .. happens to exist in both the current directory and in dir $dirname, so that's why stat "worked" on them. (Well, it didn't really work, since you weren't getting info on what you thought you were getting info.)

    This will go into an html doc so that's why you see the break tag. Cheers

    The bug I pointed out isn't the tags, it's the plain text being printed along with the tags. That plain text needs to be converted to HTML (using CGI's escapeHTML or HTML::Entities's encode_entities).

Re^3: stat only gives info on . & ..
by andyford (Curate) on Jan 18, 2007 at 19:22 UTC

    The latest thing in web-niceness is to use <br /> for XHTML compliance.

    Never mind, I guess I was thinking everybody was supposed to use XHTML now. People yelled at me loudly last time I typed <br>. Guess I misunderstood why.

    Update: strike that please!

    non-Perl: Andy Ford

      No!

      If you're creating an HTML doc, use <br>.
      If you're creating an XHTML doc, use <br/>.

      HTML and XHTML are not compatible, so it makes no sense to break HTML compliance in order to comply with XHTML when creating HTML docs.