Same Internal Server Error from last two days

2006-07-27 Thread Nath, Alok (STSD)
Hi , It's not exactly a perl query but related to it. I am trying to run a Hello World Perl Script in Apache 2.2. My script is installed in location : C:\Program Files\Apache Software Foundation\Apache2.2\bin Perl is installed in : C:\Perl\bin But its constantly giving me Internal Server

Re: queuing up user input via writes to STDIN

2006-07-27 Thread John W. Krahn
Gavin Bowlby wrote: > All: Hello, > I have a program that reads STDIN for user commands while the program is > running. > > I'm adding the capability to queue up user commands from the shell > command line when the program is invoked. > > I'd like to be able to queue the command line data up in

queuing up user input via writes to STDIN

2006-07-27 Thread Gavin Bowlby
All: I have a program that reads STDIN for user commands while the program is running. I'm adding the capability to queue up user commands from the shell command line when the program is invoked. I'd like to be able to queue the command line data up in STDIN, so that when the program goes into a

RE: Dynamically choosing CGI file based on form output

2006-07-27 Thread Charles K. Clarkson
Mike Martin wrote: : I have the following code which should : : 1. Give user a choice of actions : 2. Based on these go to the specified script : : I have the following issues : : 1. The Submit button needs clicking twice after selection : 2. Only one value can be chosen, to choose another the

Re: Other ways to assign a filehandle to a variable?

2006-07-27 Thread Dave Gray
For posterity: -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Other ways to assign a filehandle to a variable?

2006-07-27 Thread Dr.Ruud
"JupiterHost.Net" schreef: >> Use lexical ones in the first place. >> open my $fh, '<', $filename or die "open $filename, stopped" ; > > And if you're gogint to die you might as well say why :) > > ... or die "open $filename failed: $!" ; Yes, I meant: open my $fh, '<', $filename or die "op

Re: get only filenames and not directory names under a specific path.

2006-07-27 Thread Alan_C
On Wednesday 26 July 2006 00:59, Rob Dixon wrote: > Hello Alan > > Alan_C wrote: > > On Tuesday 25 July 2006 15:56, Rob Dixon wrote: > >>Nishi Bhonsle wrote: [ snip ] > > [ snip ] [ snip ] > > #!/usr/bin/perl > >use strict; > >use warnings; > > > >my @dir = do { > > # opend

RE: File opeartions help

2006-07-27 Thread Timothy Johnson
Try backticks instead of the system() call to capture the outputh. E.g. my @results = `$cmd`; -Original Message- From: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 7:48 AM To: beginners@perl.org Subject: File opeartions help Hi, I am executing follo

Re: sending output to file

2006-07-27 Thread Mumia W.
On 07/27/2006 09:20 AM, Sayed, Irfan (Irfan) wrote: Hi All, I need to send / print / write the output of one command to a file through perl script can anybody plz help. Regards Irfan. The Perl documentation which you've already read shows you how to do this. As reminders, look u

Re: Other ways to assign a filehandle to a variable?

2006-07-27 Thread JupiterHost.Net
Use lexical ones in the first place. open my $fh, '<', $filename or die "open $filename, stopped" ; And if you're gogint to die you might as well say why :) ... or die "open $filename failed: $!" ; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

Re: Other ways to assign a filehandle to a variable?

2006-07-27 Thread Dr.Ruud
"Roman Daszczyszak" schreef: > After reading Randal's March 2000 LM column and learning that you can > assign a filehandle to a scalar by doing something like: > > open(FILE, $filename) or die "whatever"; > $value = *FILE{IO}; > > I am wondering if there are other, perhaps better, ways of doing th

Re: File opeartions help

2006-07-27 Thread Joshua Colson
On Thu, 2006-07-27 at 22:47 +0800, Sayed, Irfan (Irfan) wrote: > Hi, > > I am executing following code. i need to send the output of > system($cmd); command to the file . how do i do that > > plz help This question has already been answered twice this morning. Please watch for responses to th

Re: File opeartions help

2006-07-27 Thread Hal Wigoda
why do you keep on asking the same question? On Jul 27, 2006, at 9:47 AM, Sayed, Irfan ((Irfan)) wrote: Hi, I am executing following code. i need to send the output of system($cmd); command to the file . how do i do that plz help Regards Irfan. #/usr/atria/bin/Perl -w us

Re: Implement find command

2006-07-27 Thread Joshua Colson
On Thu, 2006-07-27 at 19:19 +0530, Anoop Kurup wrote: > Hi, > > Can u help me in the coding of the Find function. I need to customize > find so that it accepts values of type "*.sh" etc with last modification > of time of +"$time" and of "$file_type" file type. If such a file is > found within the

File opeartions help

2006-07-27 Thread Sayed, Irfan \(Irfan\)
Hi, I am executing following code. i need to send the output of system($cmd); command to the file . how do i do that plz help Regards Irfan. #/usr/atria/bin/Perl -w use strict; use warnings; my $CT = "/usr/atria/bin/cleartool"; my @vob_list = `$CT lsvob -s`; my $fname = "/t

Re: sending output to file

2006-07-27 Thread Beginner
On 27 Jul 2006 at 22:20, Sayed, Irfan (Irfan) wrote: > I need to send / print / write the output of one command to a file > through perl script > > can anybody plz help. deja vu...didn't I see this 2 hours ago! perldoc -q system or perlfaq8#how_can_i_capture_stderr_from_an_external_command

sending output to file

2006-07-27 Thread Sayed, Irfan \(Irfan\)
Hi All, I need to send / print / write the output of one command to a file through perl script can anybody plz help. Regards Irfan.

Other ways to assign a filehandle to a variable?

2006-07-27 Thread Roman Daszczyszak
After reading Randal's March 2000 LM column and learning that you can assign a filehandle to a scalar by doing something like: open(FILE, $filename) or die "whatever"; $value = *FILE{IO}; I am wondering if there are other, perhaps better, ways of doing this? FYI, I googled for "assigning fileha

Dynamically choosing CGI file based on form output

2006-07-27 Thread Mike Martin
I have the following code which should 1. Give user a choice of actions 2. Based on these go to the specified script I have the following issues 1. The Submit button needs clicking twice after selection 2. Only one value can be chosen, to choose another the form must be reloaded from scratch (i

Implement find command

2006-07-27 Thread Anoop Kurup
Hi, Can u help me in the coding of the Find function. I need to customize find so that it accepts values of type "*.sh" etc with last modification of time of +"$time" and of "$file_type" file type. If such a file is found within the "$base_dir" directory then that file should be deleted. Cheers,

Re: File handling using CGI

2006-07-27 Thread Ken Foskey
On Wed, 2006-07-26 at 23:57 +0530, I BioKid wrote: > One simple question - > I need to accept a file from the user and to store it as temp1. > then I need to give this file as an input of another program : > I wrote a script like this, but it is not working : Help ? > > #!/usr/bin/perl -w > use CG

Re: PATH env variable and open()

2006-07-27 Thread Ken Foskey
On Wed, 2006-07-26 at 11:28 -0700, Travis Thornhill wrote: > Does anyone have any idea why setting $ENV{"PATH"} = "" would cause > the open() function to fail? The file I'm trying to open exists, and some > debug > printing shows that I'm in the directory where it exists. If that is literal

Re: sending output to file

2006-07-27 Thread Prabu
Sayed, Irfan (Irfan) wrote: Hi All, I need to send / print / write the output of one command to a file through perl script can anybody plz help. Regards Irfan. Hope this helps perl -e 'print `command > file`;' Example: perl -e 'print `ls -l > output`;' -- Prabu.M.A When I was b

sending output to file

2006-07-27 Thread Sayed, Irfan \(Irfan\)
Hi All, I need to send / print / write the output of one command to a file through perl script can anybody plz help. Regards Irfan.

RE: how to write content of file to an array / variable ?

2006-07-27 Thread Jeff Peng
my $file = $q->param('file'); Are you sure the $file exist on your system actually? open (FOO, ">temp1"); Under CGI,you maybe always need to specify a full path to the file.Maybe you would write: open Foo,">/your/path/temp1" or die $!; while (<$file>) Before reading,you should open th

RE: File handling using CGI

2006-07-27 Thread Charles K. Clarkson
I BioKid wrote: : I am able to do the second part, but am not able to get : the users file to a variable or array ? Read the "Files and I/O" section of the "perlintro" file in the perl documentation. HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer