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 <cfexecute to 
run a batch file which in turn runs the perl script.

How do I get around this....

At 06:35 PM 6/11/2002 +0200, you wrote:

>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 this script from the command prompt \n"; }
>#----
>
>Good luck !!
>
>Regs David
>-----------------
>
> > 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
> > 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".
> >
> > Please say yes...and how?
> >
> >
> >
> >
> > 
> 
>+-----------------------------------------------------------------------------------+ 
>
> >
> > Philip Humeniuk
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> > 
> 
>+------------------------------------------------------------------------------------+
> >
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >


+-----------------------------------------------------------------------------------+ 

Philip Humeniuk
[EMAIL PROTECTED]
[EMAIL PROTECTED]
+------------------------------------------------------------------------------------+



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to