On Tue, Nov 20, 2001 at 02:34:48PM -0600, Chad C. Walstrom wrote: > I think James was hinting to creating a database and web interface to > the TCLUG Media Exchange. Might I suggest PHP and PostgreSQL? ;-) (BTW, > what's the best way to use php on the command line? I'd love to do a > getopts style of application so that I don't have to rewrite my PHP > scripts into another language. Why do you want to use php for the command line? it wasn't what it was created for. I agree that php has earned it's place in small to the lower end market of mediumsized applications, but what else is there for php to do? Not much in my opinion. Simple shell scripts with a combination of sed/awk seems more powerful to me on the command line, and if you're really aiming high, there's perl. Which is far superior to php on the command line. How would you do a sed-like substitute operation in php? I know there are people that don't like using perl at all, but what is easier than: perl -pi -e 's/foo/bar/g' file? Even sed needs a tmp file for doing what that snippet of perl does (in my flakey memory). Oh, you wanted a backup file? no problem perl -pi.bak -e'.. Nothing beats perl's CPAN either, what do you do if you need to add an extension to php? recompile? In perl you just download the appropriate module from CPAN and you're running. You mentioned getopt, and there is infact that in perl too, infact there are tons of different styles you can use: Getop::Long, Getopt::Mixed, Getopt::Std etc. <Don't read this if you're easially offended> I've laughed of people using php for shell-like scripts, and I'm not afraid to do it again! </Don't read this if you're easially offended> *cough* -- Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/> mod_pointer <http://stderr.net/mod_pointer>