Out of some weird sense of completeness, I've decided recently to put some effort into learning C. I'd like to understand more about how things actually work, and I'd like to be able to contribute in some more serious way to projects, like Perl, that I like. Also, I had the vague notion that it would make my Perl better.
This is really hard. I'm not a math type, and I've never understood much about pure comp science, so everything is really confusing. I've been working through K&R, which is really advanced. (Aside: I also bought the Oualline book from O'Reilly, which has a weird set of Amazon reviews--some one-star reviews saying "this is too hard!", and then five-star reviews saying "this is real programming--get over it! It's a great book." However, the book is a joke compared to K&R. 70 pages into it, you're still on "Hello, world!" level stuff, while K&R has you working out genuinely difficult things from about page 5.)
First of all, every exercise, I think "I could do this in Perl in about seventeen characters." Perhaps that's the point. But I also find that I often have a good sense of how to do something, I just don't know how to execute it. And I spend all my debugging time realizing that I meant
i <= len, not
i < len, etc. If I wanted to have to know math, I wouldn't have read Classics. I'm also not sure what Perlish practices should be used in C, or what will make me look like a dork--e.g. using curly braces around single statements in C:
for (i = 0; i < MAX; ++i) { printf("%d: %d",i,value(i)); }
I'm beginning to wonder what the point of all this is. I'll never be good enough at C to actually contribute to the Perl core, or to debug perl. Will this make me a better person? Will it improve my Perl code?
Where it may help you later on is analyzing extensions that folks have written should you ever delve into their source code. Or perhaps one day you'll even look at the (*gasp*) Perl source code and actually understand it!
As for good books, I think ORA's Practical C Programming is a pretty good beginners book and Sam's C Primer Plus is a good book all-around.