 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Arnold Daniels' Blog: Perl like temporary variables in PHP
by Chris Cornutt November 02, 2007 @ 09:38:00
Arnold Daniels points out a quick method for creating what he calls "perl-like temporary variables" in the global scope of a script:
When writing code in the global scope, I often have a problem where I'm overwriting a variable. This happens even more often when I work on code of somebody else. Usually has the variable which does the overwriting is usually just a temporary variable.
His code is a simple few lines that shows how it could be used when trying to write information out to a file handle. Some of the comments on the post criticize his use of the global scope but Arnold comes back with his reasoning - mostly that there is already code in the global scope and that adding something else is only adding to it, not making things worse.
voice your opinion now!
temporary variable perl global scope temporary variable perl global scope
Community News: XAMPP Updates Packages
by Chris Cornutt October 09, 2007 @ 10:43:28
As mentioned by Elizabeth Naramore on the php|architect website today, the XAMPP project has released a new version of their software to automagically install Apache, MySQL, PHP and Perl.
From ApacheFriends.org:
In all versions we updated Apache to 2.2.6, PHP to 5.2.4 and phpMyAdmin to 2.11.1. (Find more details on the specific download page.) I'm sorry to say, but under Windows we currently have problems with the new Apache and mod_perl, which doesn't work at all. We hope to find a solution soon.
Links to download the version for your OS of choice (Windows, OS X, Linux, Solaris) can be found on this page of the project's website.
voice your opinion now!
xampp package update apache mysql perl xampp package update apache mysql perl
Sean Coates' Blog: PHP Pie?
by Chris Cornutt February 19, 2007 @ 08:20:00
Sean Coates has created a simple version of a popular bit of Perl functionality and shares the code in hi slatest post - the "pie" ability to perform a search and replace, line by line, through a file using a regular expression.
I've often found myself looking for a PHP equivalent. Not to do simple substitutions, of course, but complex ones. And since I'm most comfortable with PHP, and a I have a huge library of snippets that I can dig out to quell a problem that I may have solved years ago, I've been meaning to fill this void for a while.
So, one evening, he came home and hashed out this version of the script. He includes the code in the post...it works on the command line and pulls in a file (though STDIN) and loops through the buffered version to perform the regex replace.
voice your opinion now!
perl pie parse regularexpression code example replace search perl pie parse regularexpression code example replace search
Hiveminds Magazine: What Makes a Web Scripting Language Successful
by Chris Cornutt September 21, 2006 @ 07:24:08
On Hiveminds Magazine's site today, there's a new article that asks the question "what makes a web language successful?"
PHP, Classic ASP and ASP.NET, and soon Ruby owe their success to shared web hosting. I honestly believe that shared hosting is more important than being "enterprise ready" when it comes to web development.
Shared hosting is the reason that the internet became an economic force. So why is it that certain parts of the IT world ignore shared hosting and it's needs?
They explain what they mean by noting that Java isn't what shared hosts need, Python isn't quite there yet, and Perl is still a bit more difficult to use in a web environment. They even look at what it would take for these languages to become more "PHP-like" and really get to that next stage of web development popularity.
voice your opinion now!
web scripting language success perl java python web scripting language success perl java python
|
Community Events
Don't see your event here? Let us know!
|