> I am wondering what it takes to run CF to perform certain > tasks that are not not web related... as one would use PERL. > I've started learning PERL a few months ago as a tool to do > some local data cleansing, etc... but I still miss the > facilities CF provides for database and file interaction. > I know that you could just run cfml.exe mypage.cfm - but > what about STDIN/OUT issues? Thanks!
It's important to remember that Perl is a general-purpose programming language which is often used to build CGI programs, while CF is specifically designed solely to build CGI programs. So, CF isn't going to be a good substitute for Perl or any other general-purpose programming language for non-CGI programs. Overall, I'd recommend that you use Perl, or another language, instead of CF for these tasks. It's good to be comfortable with other languages in addition to CF. With CF, there isn't going to be any STDIN, really, other than the environment variables and script that you specify to run. So, for example, you might build a batch file that looks like this: SET QUERY_STRING=foo=1&bar=2 SET CF_TEMPLATE_PATH=c:\inetpub\wwwroot\myfile.cfm C:\CFUSION\BIN\CFML.EXE There isn't going to be a way to specify additional input while the script is running. As for STDOUT, if you run your batch file on the command line, you should see the output of the script. Keep in mind that, while you're running this, it'll have a direct impact on CF's performance with incoming web requests. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

