Fine, then post it here with "I know there are ways to do this with a few modules, but one of my design goals was to not use modules

Fair enough. I think I should add that as my standard disclaimer since I have a habit of doing that quite often.

Twice as many stats as you need (because you can get wether it's a file or a dir with one stat).

I was aware that there had to be a better way to end up with both @files, @dirs with one test but was and still am unsure how to do it. What do you suggest? Really... I was hopping for some code suggestions/improvements

Breaks on files name "..\n" (because you'll reject that with your regex match needlessly).

Where in the world are you going to find an image named '..'. I tried to create a file named '..' on windows and it will not let me. Regardless, I agree if you can create a file named '..' it will miss it, but is that really break it?? It's a bug that will silently ignore such file at most, correct? Really... I have seen mention of this before, but have never understood what the problem is. Is the problem eliminated with the use of !/^\.{1,2}\z/??

I do. You've posted this code here. Some crazy fool is going to cargo-cult your code without paying attention to your design goals or the following commentary. And that puts more bad Perl code in the world, not good code. {sigh}

merlyn, you need to stop worring about crazy people. No matter what anyone does they will still be crazy and eventually shoot themselves in the foot. :) However, this discussion has shown me some things I would not have been aware if I had not posted it.

I think I understand your frustration, however I disagree with your ideas on coping with it. The standard use CPAN response is valid but does not lead to people who know how to write better code. They do write better code because the bugs that would have been in their implementation are not there. However, they do not understand why their version had bugs. I think it keeps them as cargo-cult programers who just know how to do the routine to get the results they want. They do not grow. Im trying to grow. Telling me bad boy, dont rewrite. Will just keep me writing bad code in this world. However, If you tell me what Im doing wrong I will (hopefully :) ) learn from my mistakes.

THANKS

zzSPECTREz
My Standard Disclaimer

In reply to Re^4: Find images regardless of filetype extension. by zzspectrez
in thread Find images regardless of filetype extension. by zzspectrez

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.