Any Perl programmers here? PHP?

atlantis.powermetal

Keeper of Starscape
Jul 12, 2004
100
0
16
35
Kathmandu, Nepal
www.realityequation.net
I'm getting into Perl programming (or should I say scripting? lol) and thought it would be helpful to get to know people here into Perl as well. I guess PHP's the more popular language now (and maybe I'll learn it later). Anyway, any Perl programmers here?

Oh, and any PDF ebook I can download that'll help me start out? I have basic QBasic, very basic VB and good HTML knowledge :) I'll go out and look for a book, but I thought and ebook should help as well ;)

Cheers!
 
lol Is PHP good for Unix scripting? I haven't got up and done anything yet so I can still change my decision ;) Could you tell me why you would advise PHP to Perl? :O

Oh, could you tell me how Apache and MySQL come in? :O Do I need that compulsorily? :O

Thanks for the help ;)
 
Perl has its uses, as does PHP. What are you looking to do with it? PHP is definitely easier for web-based stuff, but if you're doing a lot of command line string handling stuff then it's Perl all the way. For general stuff, then for ease of use and to teach you techniques I'd go with Python.

You don't need Apache or mySQL to use PHP. Apache is a web server, meaning you can run your PHP scripts and generate dynamic web pages from them, viewable from the outside world. mySQL is a database server that lets you run queries in SQL (structured query language). It's good for storing the data for your dynamic pages.

Whichever you choose, you've got a lot of reading to do. You won't learn it overnight, and you'll have to stick with it and persevere.

Links:

http://www.w3schools.com/
http://www.php.net/
http://www.perl.com/
http://www.python.org/
http://www.cpan.org/
http://www.mysql.com/
http://httpd.apache.org/
 
Hehe, I was going to say :p

Perl can be pretty evil sometimes though, like

Code:
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'

But it can also be beautiful :p

Code:
      $LOVE=               AMOUR.
    true.cards.        ecstacy.crush 
  .hon.promise.de    .votion.partners.
 tender.truelovers. treasure.affection.
devotion.care.woo.baby.ardor.romancing.
enthusiasm.fealty.fondness.turtledoves.
lovers.sentiment.worship.sweetling.pure
attachment.flowers.roses.promise.poem;
 $LOVE=~ s/AMOUR/adore/g; @a=split(//,
  $LOVE); $o.= chr (ord($a[1])+6). chr
   (ord($a[3])+3). $a[16]. $a[5]. chr
    (32). $a[0]. $a[(26+2)]. $a[27].
      $a[5].$a[25]. $a[8].$a[3].chr
        (32).$a[29]. $a[8].$a[3].
          $a[62].chr(32).$a[62].
           $a[2].$a[38].$a[4].
               $a[3].'.';
                 print
                  $o;
 
Hey! Thanks all! :D And guess what, I have made my decision, and it is...

PHP!

Went out to the bookstores today and did a lot of research in addition to what I did at home. Thanks, DE for all your feedback. Really helped :)
I'm a web guy (in the sense that I design websites), so I would like to learn a language that will help me make better, dynamic websites. I read, and PHP seemed to be it. I bought Sams Teach Yourself PHP4 in 24Hours. It's a bit old (2000), but going through I really feel good. I've installed PHP 4.3.2 (I believe) and MySQL. Now to install Apache. These are on my Windows box, but I guess my coding will be done more on the Linux one. Installing PHP, Apache and MySQL there should take some time ;) (Oh, and MySQL I'll probably only install later) :D

Thanks all :D Any tips/advice you have (links to PHP communities to help me learn, for example), I'd apprecite. And any more PHP developers... show yourselves! :
 
I chose to learn PHP for the same reasons. The best link you'll ever get is the official manual at www.php.net - you can look up any function and it shows you the syntax and a good few code examples, and then people have posted their own examples and improvements of the function underneath in the comments. www.mysql.com has a great manual too.

If you want to install PHP, mySQL and Apache all in one, there's a variety of programs that install them all for you in one - for Windows at least. I've never used any, but I've heard good things about XAMPP. As for Linux (which is what I run on my desktop :)), I just manually installed and configured everything myself - it's not that hard.

Just post if you have any comments or questions :)
 
Thanks ;) I think I'll do the Linux thing as well for the fun of it. If I have problems (and I'm sure I will) I'll post it here or PM you. Did you write hazeCMS? It's great! How long did it take you to do that? What includes did you use? :D It's great... How did you integrate Python into it? You coded it in Gentoo? OMG, that's amazing! And you're 16 as well... Geez, I need to catch up ;)

Anyway, thanks for the help. XAMPP (for Linux, especially) looks great (a bit too large though). I'll be getting to my book now, and will be back soon to get some help :D

Again, thanks for being responsive. :)
 
WOW! *Gets jealous* You think I should pick up this book called Sams Teach Yourself PHP, MySQL and Apache All in One? It's just what it says. Actually, the book I mentioned earlier (from the same publishers... Teach Yourself PHP4) doesn't have on setup and configuration of MySQL and Apache. Besides, I would like to learn these about these technologies :) I saw this book in a store, so if you recommend it, I'll buy it. Some details about this book are at http://www.samspublishing.com/title/0672326205
Oh, and it comes with a CD with PHP, MySQL and Apache (2004 publication, so new ones) which I'm too laze to download myself :p

What say you? (And obviously I know I can rely on your advice because I know you're a good programmer)
 
I have never really liked programming, but I don't mind the "web" sort of coding. So I have learnt a little PHP, but would really like to learn a whole lot more. See I think that with Perl I just sort of looked at it and thought why bother, because it looked far too complicated for what I was prepared to do. PHP seems to be very flexible to work with, though I have spent some time swearing under my breath at it.
 
Perl and PHP are remarkably similar. I love Perl because it has integrated regular expressions and because you can golf it down to be really small and efficient :)
 
OMG! Sixteen and Perl, PHP, Python :D You do good :D
Proud to have coded a simple PHP script today, one that simply calculates simple interest. Lame, I know, but I used functions with arguements, and also tried some dynamic variables. :p Anyway, enjoying it tons. Couldn't test it out because I don't have AMP installed... yet :D
 
Aecliptica said:
^^ i have that book

Great! :D Could you help me out here?

I wanted to know how you found it (lol, in some bookstore or website, obviously lol and obviously that's not what I mean) and if you would recommend it to me. As you may have guessed already, I'm a newbie just learning PHP. I want to learn the technology and workings of MySQL and Apache, and how PHP integrates with it.

Also, my slow connection means I can't download those here (and I read they're on the CD).

Is it a good book?

Just wanted to know your thoughts... :Spin:
 
I work in a bookstore and i had some free money to throw away and realized i wanted to learn some php as its in my course outline for this year. I bought it and it has some great examples and perfect for a noob, so i reccomend it.