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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
I'm c++ programmer under win and Linux (mostly qt).
and in Linux world I have some small expedience in shell scripting.
now i want to learn a new language, I want to know what is the general propose
of Perl and Python in one line!
Thank you all!
Eric
Click here to see the post LQ members have rated as the most helpful post in this thread.
maybe you're a MSDN fan.
But now, try to learn more about Kernel System Calls & Glibc.
Quote:
in Linux world I have some small expedience in shell scripting
Some small experience is too small. If you don't want to call for a administrator to make your system up, please don't hesitate to learn your default system configuration scripting language.
As a matter of fact learn sh or bash in depth
Quote:
I want to know what is the general propose
of Perl and Python in one line!
I haven't good experience in Python, But about perl
1- It's perl, It is not Perl or PERL!
2- Originally it was designed for String/Text Game(I real hot loving game)- I like that
3- Do you like to become a perl's master? you must think like Larry when you design/write code, before refering to perldoc
4- You can achieve one result from n way -- Relax Syntax
why I don't answer your question in one line?
Because perl is not {C#,VB,VC++}
Originally, most scripting languages were designed to do a specific task and do it well. But now they are so powerful that they can achieve many many things. Given that you already have some experience with C++, an adventure into scripting would be a good move. I would say pick one (Perl, Python, PHP, Ruby etc..),and give it a whirl.
Quote:
Originally Posted by vigol
1- It's perl, It is not Perl or PERL!
Are you sure? A quick search on Amazon and all the texts on the first page I saw wrote it either Perl or PERL. Looking inside a text co-authored by a chap with the name Larry Wall has the following: "Most Perl programmers tend to follow an imperative (also called procedural) style,". (Programming Perl (3rd Edition) pg 206)
Quote:
Originally Posted by vigol
3- Do you like to become a perl's master? you must think like Larry when you design/write code, before refering to perldoc
For me that would be a really turn off for the language. To be able to code well in it you need to think like someone else. Yuk.
Perl and Python are scripting languages used in little/medium programs. But it's main objective is used to make various components previously created to interact between so they're caled glue.
They're good in applications which manipulates a greate diversity of structures, applications that changes too quickly, applications that need to be expandble, administration of files, administration of users, dns and other name services in networks, administration of databases, using e-mail for administration of systems, manipulation of log files, security and network surveilance, administration of systems supported over XML, programming for web.
Never use this kind on languages in real time programs.
Perl - name of language
perl - name of actual perl executable (thing that runs your programs)
PERL - post-facto 'backronym' with 2 expansions a) Practical Extraction & Reporting Language (mgrs) b) Pathologically Eclectic Rubbish Lister (programmers definition)
Almost all of the things that you'll be doing are going to be "things that have been done before." Things that have been done hundreds of times before. It is absolutely senseless to spend original effort doing not-original things.
The raw speed-of-execution of a program is, quite frankly, unimportant. But the speed and accuracy with which you can develop it is vital. You are the expensive part of the equation. Your time is what needs to be conserved.
Perl gives you access to the CPAN library, which consists of many thousands of thoroughly-tested packages including some that really are "rocket science." CPAN is the pay-dirt. CPAN is "what all the fuss is about."
There are too-many tools out there which are "special purpose." PHP, say, may be fine for websites, but will you use it for anything else? (Oh, you could, but is it really designed for anything else?) It is very handy to have ready access to a tool that can be applied in all sorts of situations, and on any type of computer that you might sit down in front of (or put in your pocket).
Among the various tools in your toolbox, some of them are have well-worn handles from being picked up and used over and over again. Their blades are sharp and they are well cared-for. Perl is such a tool. Highly recommended.
Almost all of the things that you'll be doing are going to be "things that have been done before." Things that have been done hundreds of times before. It is absolutely senseless to spend original effort doing not-original things.
The raw speed-of-execution of a program is, quite frankly, unimportant. But the speed and accuracy with which you can develop it is vital. You are the expensive part of the equation. Your time is what needs to be conserved.
Perl gives you access to the CPAN library, which consists of many thousands of thoroughly-tested packages including some that really are "rocket science." CPAN is the pay-dirt. CPAN is "what all the fuss is about."
There are too-many tools out there which are "special purpose." PHP, say, may be fine for websites, but will you use it for anything else? (Oh, you could, but is it really designed for anything else?) It is very handy to have ready access to a tool that can be applied in all sorts of situations, and on any type of computer that you might sit down in front of (or put in your pocket).
Among the various tools in your toolbox, some of them are have well-worn handles from being picked up and used over and over again. Their blades are sharp and they are well cared-for. Perl is such a tool. Highly recommended.
And Perl is a darn good functional (i.e. of the LISP/Haskell/OCaml flavor) language - I am using its functional side a lot, and it's fun, i.e. convenient and robust.
Last edited by Sergei Steshenko; 01-19-2010 at 03:39 PM.
Now that you've chosen Perl, remember that regarding object creation Perl is very different from C++ in a sense that in Perl constructor does return a value.
In the beginning it might look like a non significant difference, but in reality the difference is huge - it drastically affects the way you can (and probably should) write your code.
... and when you've immersed yourself in Perl (a good choice, by the way) and want to learn yet another language, and you wish to expand your horizons a little, consider LISP.
For me that would be a really turn off for the language. To be able to code well in it you need to think like someone else. Yuk.
At least it can be true in a context of the expression decision between Scalar and List. But I correct my previous thread :
prediction of how Larry think instead of Thinking like Larry.
Quote:
Originally Posted by graemef
Are you sure? ...Looking inside a text co-authored by a chap with the name Larry Wall has the following: "Most Perl programmers tend to follow an imperative (also called procedural) style,". (Programming Perl (3rd Edition) pg 206)
These are some facts about perl from following references:
Paradigms of Artificial Intelligence Programming, by Peter Norvig
Learning Perl, 4th Edition, By Brian D Foy, Tom Phoenix, Randal L. Schwartz
Higher-order perl, by Mark Jason Dominus
Perl in a Nutshell, By Ellen Siever, Stephen Spainhour & Nathan Patwardhan
1- perl was originally designed as a replacement for C on the one hand and Unix scripting languages like Bourne Shell and awk on the other.
2- perl is much more like Lisp than it is like C.
3- perl shares some important features with Lisp such as first-class functions, dynamic access to the symbol table, and automatic storage management.
4- perl is primarily developed for unix, It has been called a "Pathologically Eclectic Rubbish Lister".
It's a retronym, not an acronym.Larry , came up with the name first and the expansion later.
5- Some nice, but not exlusive features : CGI development (CGI), Database interconnectivity & database independent interface (DBI, DBM),
Network programming (Sockets Interface) [WEB, Email, News, FTP], GUI (Perl/Tk)
I have a lot of Perl books, but that was the one that helped me maximize my knowledge of Perl. It might seem counter-intuitive that a book on regular expressions would make someone a better programmer, but Perl's greatest strength is its string processing ability. To understand its string processing ability, you need to understand regular expressions. Thus the need for the book.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.