Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question about this forum database desing ?
#31
Example of why PHP has better documentation:

Perl documentation on the "glob" command:
http://www.perldoc.com/perl5.8.0/pod/func/glob.html

PHP documentation on the equivalent PHP function:
http://us3.php.net/glob

What makes Perl hard for most people is one liners. You can literraly write a complicated 50 line PHP/C++/BASIC/Whatever program in 1 or 2 lines in Perl. (what with $_, etc.)

In Perl, you also have to send the content type, and it's not really built for web. PHP has a strip_tags function, setcookie function, the list goes on. It's made for the internet and HTML.... Perl was made for reports.

Of course, Perl is in many ways a stronger language. I'm just saying that coming from the right perspective (most agree that BASIC is the wrong one Tongue) PHP is easier.

-[Unknown]
Reply
#32
$_ is the "default" variable. If a variable isnt specified, $_ is assigned to it.

Also, the reason you can stuff everything on one line in Perl is because it doesnt register whitespace and line breaks. you could have 1 word a line if you like, it's part of Perl's' flexibility. But that makes it easier to code, so it really shouldnt be a problem for a beginner.

I think a lot of people underestimate Perl's modules as well. You dont have to send the content type if you use the header() function of the standard CGI module or the CGI::Cookie component. CGI and DBI both come packaged with perl.

and as for glob info, that's cheating. Perl is Unix is perl, it was the batch file language for it. You're supposed to know glob Smile. try this one on for size:

http://www.perldoc.com/perl5.8.0/pod/func/open.html
http://www.perldoc.com/perl5.8.0/pod/perlopentut.html
http://us3.php.net/manual/en/function.fopen.php

But i'm not going to say PHP is harder or anything, or that Perl is more powerful. PHP is definately faster, which is a good reason for anyone to use. Perl is definately more flexibal, which makes it more forgiving. All in all, it's two different languages with the same syntax. And as for BASIC, well, I've seen CGI qbasic programs, and i'd have to agree with you on that one Smile
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#33
I use PHP + MySQL at www.sephplanet.com
earn.
Reply
#34
A few months ago I started codin' in PHP, some time later I got into MySQL...I think it's very easy---ca. a half year ago I tried perl, but I like PHP better
B 4 EVER
Reply
#35
Na_th_an,

I know what $_ is. I actually know how to write Perl code. Plus, PHP is also of the whitespace ignoring variety. I was talking about stuffing a million commands in one line (like a loop statement or something.) without using any scratch variables or anything. It actually makes for fast code, but it is confusing for the beginner.

The CGI module isn't really that great. Every Perl program I've seen has gotten more than 30% faster and more efficeint after the CGI dependancies were removed. And, modules and things are hard for beginners... that's what I was talking about throughout my post.

But, you're right - PHP vs. Perl isn't a big difference. Although I will say Perl is more powerful. And, if you use mod_perl and the like, Perl is just as fast.

-[Unknown]
Reply
#36
The everlasting Perl mantra: Makes easy things easy and hard things possible. 8)
Reply
#37
Quote:The everlasting Perl mantra: Makes easy things easy and hard things possible. 8)

Nope Mr TM TOWTDI (TIM TOADY) will disagree about that..
Reply
#38
Huh? Oh well... it was on the cover of the camel book. Big Grin
Reply
#39
Quote:"]Na_th_an,

I know what $_ is. I [...]

Uh? What?
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#40
<-(rank) I think he thinks I'm you.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)