On Sat, Feb 24, 2001 at 11:40:04PM -0800, Bob Miller wrote:
>
> It looks kind of ugly:
>
> <!--#perl sub="sub {print 'Hello, <b>World</b>!'}" -->
>
> But if you're already fluent in Perl, it's a lot easier than learning
> a whole 'nuther programming language.
I started making websites about a year and a half ago. I was uning
Apache on Win98 to test my HTML. I got bored with static HTML real
quick and discovered perl. This eventualy lead me to Linux. (I didn't
know what Linux was, but I figured it had something to do with com-
puters 'cuz I kept seeing "Linux Spoken Here!" at the PC-Training Center
:-)) A few months ago I started using PHP. Mmmmmmhmhmhmhm... PHP ;>
The only reason I started using PHP is because it IS so similar to perl.
PHP actually started life as a perl hack.
I use MySQL a lot, for the same reasons I use PHP. They're relatively
lightweight, and I can do what I want with them. I never thought
of actuallu putting BLOBS in a database (I just store identifiers),
but that's something I'd probably use perl and postgresql for. Especial-
ly after reading the discussions. What I usually end up with is a mix
of PHP and perl. I run OpenBSD on my work box, which doesn't support
VIA's AC97 codec (very well). My httpd server is in the same room I us-
ually work in, and still has a sound card in it that works with linux.
So I made a PHP/MySQL mp3 player. Fully searchable, all kinds of play-
list options, and it was pretty easy. Having all your "pages" in the same
directory is my favorite aspect of PHP. It was easy until it was time
to fork the mp3 command, and return the html closing. I could get sound
to start, but the browser would keep trying to load the rest of the page.
So I mv'd the play.php doc to cgi-bin/play.cgi, added the usual perl CGI
headers, made some minor changes like mysql_fetch_row -> fetchrow_array,
(M-% in emacs ;p) and added a basic open() fork. Now I even get the pid
so I can stop play with a PHP script. I also used the MP3::ID3v1Tag
module from CPAN to get the ID3 info from the mp3s. I didn't look into
using PHP, because it's just a script to load the database, not web based.
I don't even know if there's any mp3 modules for PHP (probably so), and
the only reason I knew there was one for perl is CPAN. I'm interrested
to see how pear works out.
In general, I find PHP simpler to use, but perl is much more useful.
<[EMAIL PROTECTED]>