






|
Nimiety's Code
Open Source coding was listed in many articles and on many sites as one of the most important developments in Internet and business technology going into 2004, and will continue to play an important role in how businesses roll out new applications and platforms.
Granted, this won't change Microsoft's hold on the desktop environment, however, web, mail and other application servers, are seeing sustained growth in linux and other *nix operating systems.
Why? The software is free - the only cost is the time of development and support, which is equatable in most cases to the more expensive environments, thus saving thousands in lisencing.
This means growth in the opportunity of enterprise-level tool development, and growth in "basement programmers".
The basic tools needed to begin learning and practicing are a PC with linux, with Apache, MySQL and Perl installed, and the time and innovation to try to piece together new concepts from simple building blocks.
Why these three? Apache is normally part of a basic Linux installation, MySQL is widely available and free, and Perl is not only free and a basic part of Linux, but is also widely available from different hosting ISP's, so if you ever move into the limelight, you can transport your code without any extra fees.
Code for a simple "Hello World" web script
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "Hello World!!\n";
exit(0);
Code for a simple MySQL search web script
#!/usr/bin/perl -w
use Mysql;
$db = Mysql->Connect('localhost','dbname','username','password');
$search = $db->query('select * from dbtable');
print "Content-type: text/html\n\n";
print "<table>\n";
while (%data = $search->fetchhash) {
print "<tr><td>$data{c1}</td><td>$data{c2}</td><td>$data{c3}</td></tr>\n";
}
print "</table>\n";
exit(0);
|
|