Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Preaching Perl gospel to PHP converts...

by ignatz (Vicar)
on Apr 24, 2002 at 16:03 UTC ( [id://161661]=note: print w/replies, xml ) Need Help??


in reply to Preaching Perl gospel to PHP converts...

For the most part the biggest hurdles about getting them into Perl are going to be the same as they are for anyone. Here are the PHP centeric points that spring to mind:
  • Use strict or die.
    PHP coders can get into a lot of bad habits. As always, this will save everyone a lot of pain.
  • CPAN is your friend.
    The power and flexibility of the CPAN will come as an epiphany to PHP programmers. PEAR is lightyears behind it.
  • The difference between == and eq.
    This is always a big hurdle.
  • sub vs. function
    function foo($bar = "Paco") { }
    vs.
    sub foo { my $bar = shift || "Paco"; }
  • Object-Oriented Programming
    Perl's quirky yet powerful OO syntax will be hard for people used to PHP's much cleaner and weaker support.
  • Know your data structures
    PHP variables are a very forgiving one size fits all that make moving over to Perl's stricter data structures a headache.
()-()
 \"/
  `                                                     

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://161661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-03-19 08:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found