Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi guys,

Just a quick ques, because, though I know this is a perl forum, well ..., I've always thought c-programmer and perl-programmer relations are probably very amiable ..., with alot of folks doing both, so I thought ..., (and it's probably already been asked), I thought I'd ask ... whether there are some very rough guidelines for choosing to write up something in Perl or in C?

My main rule of thumb was: if dealing with strings/text: go for Perl. If numbers? C. And, indeed, right now, I'm dealing with matrices of numbers, and so, have been using C.

However, I have to say, that the stdlib functions, fseek and its brothers, are syntactically verbose -imho-, and not so powerful either.

There is the option of, let's say, doing preprocessing in perl and number crunching in c, but I'd prefer all in one makefile (I'm assuming you can't have one makefile for both), so it's either one or the other.

So I was wondering ... has anybody any broad and brief guidelines of when to choose between the glory that is Perl, the grandeur that is C? (excuse me, Edgar Allan :-)).

In reply to when to c, when to perl by stabu

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found