[tpm] Perl to C learnings

Shlomi Fish shlomif at iglu.org.il
Sat Aug 28 02:00:46 PDT 2010

Hi Digimer,

On Saturday 28 August 2010 07:23:34 Digimer wrote:
> Hi all,
>   This may seem like an odd post, but I have a potential job lined up. I
> told them that my C experience is weak, to be polite, and that the bulk
> of my experience is in Perl. They want to give me a chance though, so
> I've been given some time to write a relatively simple C program.
>   So my question is; Can anyone recommend a C tutorial, guide or similar
> aimed at Perl programmers? Most of the guides I've found assume little
> to no programming experience, so I've spent a lot of time reading things
> I know. Normally I wouldn't mind, but I've got a fairly limited amount
> of time to submit this program and prove my ability to learn.

Best I can think of is:


Written by Andy Lester who is a Perl programmer.

Not sure it would be enough for you, though.

>   I'm specifically not talking about the program, as I want to see for
> myself how quickly I can adapt. The main things I need to know are file
> reads and string manipulation, if that helps with recommending resources.

String manipulation in C is much harder than in Perl. You may wish to read 
this article for a little about the philosophy of strings in C (and some other 


file I/O is better done using the FILE * objects and such functions as 
fprintf, fwrite, fread, fopen, fclose, etc. so read about them.

Finally, you may wish to look at some of the libraries here which provide more 
convenient APIs and better portability:


>   Thanks in advance all! If this wasn't such a potential awesome job on
> the line, I'd not bother the list with non-perl stuff. :)

Good luck with this job.


	Shlomi Fish

Shlomi Fish       http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy

God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

More information about the toronto-pm mailing list