Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I fear you will never get a solution that extracts all c-files, and no others... no matter how hard you work.

That's why you should spend more time with your friend first (as suggested by GrandFather):

  • how fault-tolerant should your solution be? (e.g. a 90%-detection-rate might be fine)
  • is it more desirable to have false positives (files wrongly classified being in C) of false negatives (C files that have been missed)?
  • what is the environment (how likely are people using "wrong" extensions, e.g. a perl-script in a .c-file)
  • how fast should your solution be? (e.g. is it acceptable to do a lot of plausi-checks on that hundreds of 20-MB-.cpp-files to ensure that none of them is in reality C?)
In my experience, the time used to understand the use-case of your customer and to investigate with him where it is possible to "cut corners" is well invested. It will give you the possibility for easier solutions, and lead to higher customer satisfaction. And less change-requests afterwards ...

HTH, Rata

In reply to Re^3: simple C checking script by Ratazong
in thread S simple C checking script by heatblazer

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the monks are mute...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (3)
    As of 2017-11-19 13:20 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      In order to be able to say "I know Perl", you must have:













      Results (281 votes). Check out past polls.

      Notices?