Re: Checking environment variables...outputting to file

2002-06-11 Thread drieux
On Tuesday, June 11, 2002, at 09:14 , phumes1 wrote: > This way if someone runs the script from a command prompt I output it to > the screen using >CON: and if its run from a web browser then I redirect > it to a file and then read that file to the browser after completion > using >output.txt

Re: Checking environment variables...outputting to file

2002-06-11 Thread phumes1
OK...thanks for all the great examples but because I'm running either manually from a command prompt our from a batch file via web browser they are both being executed as a command prompt. This is how ColdFusion sees it. SoI have a batch file with the following line. Note: The runme.exe i

Re: Checking environment variables...outputting to file

2002-06-11 Thread drieux
On Tuesday, June 11, 2002, at 09:58 , phumes1 wrote: > Weird. > > I put the below lines in my perl script and ran it from the command > prompt and from a web browser yet the results are telling me > that "You have started this script from the command prompt" > > Why? > > Is the HTTP_USER_AGENT

Re: Checking environment variables...outputting to file

2002-06-11 Thread phumes1
Hang on...I have a batch file that is being executed. In the batch file contains my perl script that I'm executing so the below does work. If anyone is familiar with Allaire Cold FUsion I'm using the Hi, > >There should be many ENV that would only be set if you are using a >browser, but >one of

Fwd: Re: Checking environment variables...outputting to file

2002-06-11 Thread phumes1
+0200 (METDST) >From: David vd Geer Inhuur tbv IPlib <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED], [EMAIL PROTECTED] >Subject: Re: Checking environment variables...outputting to file > > >Hi, > >There should be many ENV that would only be set if you are using a >brow

Re: Checking environment variables...outputting to file

2002-06-11 Thread David vd Geer Inhuur tbv IPlib
Hi, There should be many ENV that would only be set if you are using a browser, but one of them might be HTTP_USER_AGENT. Here is a tested example : # if($ENV{'HTTP_USER_AGENT'}) { print "Content-type: text/html\n\n"; print " You are using a browser"; } else { print "You have started t

Checking environment variables...outputting to file

2002-06-11 Thread phumes1
Hi, I thought of another way possibly...of doing this. Is there a way through environment variables (or someother way) to check to see if the perl script is being run via command prompt or from a browser (web interface)? This way if someone runs the script from a command prompt I output it to