ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Programming in linux is really a new topic for me.
Shell script helps to do repetitive task but i heard it's not recommended for long or complex task. an alternative to shell script, which i always hear people on the net talk about, is perl. they says that this is very good for complex task on linux system.
So I wonder what about C and C++ ? can these 2 languages do the same thing as perl does? and which one is better?
Thanks,
From someone who knows almost nothing about programming in linux.
you can use c and c++ for doing the same job aswell but the coding may
be difficult compared to when done in perl or any other such scripting
language.
So if you would like to concentrate on the task you need to perform
instead of debuging all the long lines of code you write in c++ or c, it would
be better to prefer perl or some other scripting language like python etc..
that's what most of the people use.
There is one big advantage of perl ove c / c++: Its ability to read files / text inputs, process the input using regular expressions and create any type of ouput of the text. It c you have to make a hash of things to do such tasks.
Furthermore, the syntax is not very far from c, so that you can learn perl easily if you know c.
And finally, perl doesn't lack much c has, e.g you have access to processes and you can implement even internet-sockets in perl.
Perl is like an allround language.
i have checked out some info about perl and after all i have another question.
As a newer version of perl is released in a short period of time. So let say i write my perl script in perl version xx. After a while, there is another newer release of perl.
So how can i upgrade to the newer version without any effect on my current code or the need to rewrite my code?
In general I would say that the newer version of Perl should just have some things added to the API--usually a language doesn't change so much so fast that your old code breaks with small version changes!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.