Re: I find the perl syntax easier than python



On Apr 29, 11:12 am, fli...@xxxxxxxxx wrote:
I like perl. I've reading about python lately, which I found a little
annoying, and, today, I picked up Learning Perl and read a few

I find pantyhose annoying.

chapters. I like it. I think python is perhaps intended for someone
who hadn't programmed before, although, personally, I think it
somewhat fails at that. Perl, on the other hand, for someone who likes
shell, grep and awk, like I do, seems intuitive.


This depends on how you view Perl. Perl can be viewed as either
Procedural or Object Oriented paradigm

I also like the versatility of the syntax. That said, although it's
versatile, it also seemed consistent.

Versatility isn't always a good thing. Sometimes this can lead to
stuff being inconsistent. Consider the following code I duped from a
Google search -).

#!/usr/bin/perl -w

use strict;

sub alter ($) {
$_[0]= $_[0] . " blub";

}

my $s= "bla";

print "string before: $s \n";
alter( $s );
print "string after: $s\n";

[cdalten@localhost ~]$ ./alter.pl
string before: bla
string after: bla blub

vs

#!/usr/bin/perl -w

use strict;

sub alter ($) {
my $string = shift;
$string = $string . " blub";
}

my $s= "bla";

print "string before: $s \n";
alter( $s );
print "string after: $s\n";

[cdalten@localhost ~]$ ./alter.pl
string before: bla
string after: bla

Python just annoyed me a little. It was just inconsistent.

In the end, all programming languages are just fagged up versions of
Lisp. Don't believe it? The following URL makes from some interesting
late night reading

http://www.paulgraham.com/icad.html


Chad

.


Quantcast