|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^5: Perl vs Cby Marshall (Canon) |
| on Mar 16, 2009 at 13:54 UTC ( [id://750895]=note: print w/replies, xml ) | Need Help?? |
|
Yes, a char is a character. But char*, is a pointer to an character. And char** is a pointer to a pointer to a character (array).
Ok some examples: In Perl, the list "knows" how big it is. This is not true in C! In C we have to do stuff to help things out! Like this: For me, the difference is obvious! The Perl version is cool! The alternative way in C would be to keep track of the number of items in the list array instead of a NULL value sentinel (and yes, there are more ways than than one I showed above). All ways are a pain in the rear compared with Perl! Perl lists may be changed at will just like in C. I don't understand this comment: "lists are unmutable". Please explain, I just don't understand what you mean.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||||