LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 08-09-2004, 04:04 AM   #1
mrpc_cambodia
Member
 
Registered: Jun 2004
Posts: 131

Rep: Reputation: 15
Shell Script, C, C++, or Perl ?


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.
 
Old 08-09-2004, 04:24 AM   #2
gizmo_thunder
Member
 
Registered: Apr 2004
Posts: 101

Rep: Reputation: 15
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.
 
Old 08-09-2004, 04:30 AM   #3
mrpc_cambodia
Member
 
Registered: Jun 2004
Posts: 131

Original Poster
Rep: Reputation: 15
Thanks so much for your immediate help.
 
Old 08-09-2004, 04:40 AM   #4
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
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.
 
Old 08-11-2004, 08:23 PM   #5
mrpc_cambodia
Member
 
Registered: Jun 2004
Posts: 131

Original Poster
Rep: Reputation: 15
Ok, as u have said perl is very good.

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?


Thanks,
 
Old 08-12-2004, 10:18 AM   #6
naijaguy
Member
 
Registered: Aug 2004
Posts: 88

Rep: Reputation: 15
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
reading idle time with perl/shell script daryl314 Linux - General 1 12-27-2004 01:11 PM
Perl shell-out to script dunna work. Works on command line. Why? jlangelier Linux - Software 1 08-28-2004 02:00 AM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 06:25 PM


All times are GMT -5. The time now is 03:56 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration