RE: [PHP] PERL vs. PHP

From: Date: Fri, 20 Apr 2001 21:19:25 +0000
Subject: RE: [PHP] PERL vs. PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-49602@lists.php.net to get a copy of this message
PHP was started as a suite of perl programs... it is heavily influenced by perl. if you understand PHP and are comfortable with it, you should not have any problems learning Perl. there are some very important differences between the two languages that you need to keep your eyes open for, things like variable scoping (perl vars are global by default) and variable prefixes @varname = array $varname[1] = item in the array %varname = hash (assoc. array) $varname{'name'} = element of the hash. PHP kind-of smoothes over the perl approach to variables and makes *everything* $varname, $varname[1], $varname['name'] IMO, perl allows you greater control over a number of things that PHP doesn't address, but that's mainly becuase perl is older and has had more time to build up funcitonality and also becuase perl's focus is larger than web-based projects (so you can use perl to do some things that you probably cant do in PHP, like create daemons and servers) all in all, if you know and love PHP, you'll probably find a friendly home in Perl. :)

« previous php.general (#49602) next »