Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Is Perl worth learning?

Name: Anonymous 2010-07-09 23:33

Hi /prog/. I have Programming Perl and some spare time, should I learn Perl? I know the syntax is terrible, but is there anything good about it?

Name: Anonymous 2010-07-09 23:34

It's not sepples. But that's sort of damning with faint praise, isn't it? Yes, it is.

Name: Anonymous 2010-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.

Name: Anonymous 2010-07-09 23:40

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.

Name: Anonymous 2010-07-09 23:41

>>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.

Thanks for the replies.

Name: Anonymous 2010-07-09 23:41

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.

Name: Anonymous 2010-07-09 23:42

>>4
>between PHP and Ruby
. . . What.

Name: Anonymous 2010-07-09 23:42

Which language would you recommend is more beneficial to learn from: Perl or Python?

Name: Anonymous 2010-07-09 23:44

>>8
Without question, Python. Perl is explicitly designed to teach bad habits.

Name: Anonymous 2010-07-09 23:57

>>8
scheme

Name: Anonymous 2010-07-10 0:10

>>8
+1 for python

Name: m7 2010-07-10 1:02

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.

Name: Anonymous 2010-07-10 4:34

>>9
>>6

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

Name: Anonymous 2010-07-10 4:36

>>12
m7
Hello.

Leave, thanks!

Name: Anonymous 2010-07-10 5:03

   1.  print "Hello, world";

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.

   1. print("Hello, world\n");
   2. print "Hello, world\n";

More detailed information about Perl syntax can be found in perlsyn.

Name: Anonymous 2010-07-10 5:12

>>13
I bet you're one of those people who doesn't see anything significantly wrong with PHP or Sepples.

Name: Anonymous 2010-07-10 5:14

>>16
you are mistaken with that.

Name: Anonymous 2010-07-10 5:16

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.

Name: Anonymous 2010-07-10 5:49

>>18
Write a perl interpreter in PHP.

Name: Anonymous 2010-07-10 5:51

>>18
Literally every modern host has CGI support.

Name: Anonymous 2010-07-10 7:20

http://esolangs.org/wiki/User:12mrsaturns
WHICH ONE OF YOUS IS THIS FUCKER

Name: Anonymous 2010-07-10 7:24

>>21
Please come back after acquainting yourself with http://usingenglish.com

Name: Anonymous 2010-07-10 12:12

>>22
IT'S YOU ISN'T IT

Name: Anonymous 2010-07-10 12:44

>>4
[quote]Perl used to have more powerful regular expressions than most languages[/quote]
please, learn about basic CS you faggot

Name: Anonymous 2010-07-10 12:46

>>24
Indeed, I think the word he was looking for was "convenient"

Name: Anonymous 2010-07-10 13:07

>>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.

Name: Anonymous 2010-07-10 14:13

>>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]

Name: Anonymous 2010-07-10 16:55

>>27
(or "regexen", when I'm in an Anglo-Saxon mood)
This is not the only reason I loathe Larry Wall, but it's a pretty big one.

Name: Anonymous 2010-07-10 17:24

>>28
Why don't you write about it in your blog?

Name: Anonymous 2010-07-10 17:35

>>29
/prog/ is my blog.

Name: Anonymous 2010-07-10 18:25

>>28
Have you seen his chartreuse lately? You'll forget all about 'regexen' once you do.

Name: Anonymous 2011-02-03 1:23

Name: Anonymous 2011-02-04 12:04

Don't change these.
Name: Email:
Entire Thread Thread List