It's not sepples. But that's sort of damning with faint praise, isn't it? Yes, it is.
Name:
Anonymous2010-07-09 23:37
Hmm.. I don't think there are any real benefits to using Perl over other languages. However, I do know lots of people that use Perl to update their sites automatically, but that can be done in other languages. I think it's just fun to code in Perl, though.
Perl used to have more powerful regular expressions than most languages, but nowadays, there's absolutely no reason to use it for anything anymore. It's halfway between PHP and Ruby in terms of awfulness.
>>3
That's pretty much what my thoughts on it were, just that it would be fun to learn a new language. I'll probably do it anyways as I've really got nothing better to do, just wanted to hear /prog/'s thoughts on it.
It's useful for quick hacks and better than PHP, but that's not saying much. It's also installed on most *nix'es.
I use proper languages for most of my programs, but I can see why other people would prefer Perl. It's probably not harmful to learn it as long as you don't start using it for large-scale/real programs.
If you're interested in gaining more general programming experience ... yes, I don't see why not. Sure, it teaches bad coding habits and the syntax is damn near unreadable, but still, it's nice to know, if only for knowledge's sake.
Its not as bad as you think, its the programmers who have bad habits, you could make a whole project in perl without problems.
A perl program is as readable as you make it
Comments start with a hash symbol and run to the end of the line
1. # This is a comment
Whitespace is irrelevant:
1. print
2. "Hello, world"
3. ;
... except inside quoted strings:
1. # this would print with a linebreak in the middle
2. print "Hello
3. world";
Double quotes or single quotes may be used around literal strings:
1. print "Hello, world";
2. print 'Hello, world';
However, only double quotes "interpolate" variables and special characters such as newlines (\n ):
1. print "Hello, $name\n"; # works fine
2. print 'Hello, $name\n'; # prints $name\n literally
Numbers don't need quotes around them:
1. print 42;
You can use parentheses for functions' arguments or omit them according to your personal taste. They are only required occasionally to clarify issues of precedence.
I used to love Perl, but recently I've begun to loathe it. The thing is, I write web scripts and, as the only other thing on many hosts is PHP, I have no real choice.
>>24
No you. ``Powerful'' doesn't just mean you can do more with them than with something else. Python is more powerful than x86 assembly, too, even though they're both Turing complete.
If you're going to be pedantic, at least be right.
>>24
❝'Regular expressions' [...] are only marginally related to real regular expressions. Nevertheless, the term has grown with the capabilities of our pattern matching engines, so I'm not going to try to fight linguistic necessity here. I will, however, generally call them "regexes" (or "regexen", when I'm in an Anglo-Saxon mood).[4]❞