RE: Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
Ramnish, Here's my Hello World Cgi script which I am trying to run #!/usr/bin/perl print "Content-type: text/html\n\n"; print "Hello, World."; It has no problem. Thanx, Alok. -Original Message- From: Ranish George [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 12:45 PM To: Nat

Re: Same Internal Server Error from last two days

2006-07-28 Thread Ranish George
Nath, Alok (STSD) wrote: 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 constantl

httpd.conf problem restarting with additional directives

2006-07-28 Thread Sastry
Hi I am using IBM Http Server(IHS) and adding a Directive for awstat application to the httpd.conf. Here is the snippet of the added Directives # # Directives to allow use of AWStats as a CGI # Alias /awstatsclasses "/u/servers/awstats-6.5/wwwroot/classes/" Alias /awstatscss "/u/servers/awstats

Re: Same Internal Server Error from last two days

2006-07-28 Thread Ranish George
Nath, Alok (STSD) wrote: Ramnish, Here's my Hello World Cgi script which I am trying to run #!/usr/bin/perl print "Content-type: text/html\n\n"; print "Hello, World."; It has no problem. Thanx, Alok. -Original Message- From: Ranish George [mailto:[EMAIL PROTECTED] Sent: Friday, J

Re: Same Internal Server Error from last two days

2006-07-28 Thread Mumia W.
On 07/28/2006 02:25 AM, Nath, Alok (STSD) wrote: Ramnish, Here's my Hello World Cgi script which I am trying to run #!/usr/bin/perl print "Content-type: text/html\n\n"; print "Hello, World."; It has no problem. [...] When apache encounters an error, it records it in its error.log. What

RE: Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
I have checked that.It was saying [Fri Jul 28 12:55:08 2006] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't create child process: 720003: first.pl [Fri Jul 28 12:55:08 2006] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : cou

Re: Same Internal Server Error from last two days

2006-07-28 Thread Ranish George
Nath, Alok (STSD) wrote: I have checked that.It was saying [Fri Jul 28 12:55:08 2006] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't create child process: 720003: first.pl [Fri Jul 28 12:55:08 2006] [error] [client 127.0.0.1] (OS 3)The system cannot find

RE: Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
Ramnish, I have tried that.No success ... Thanks, Alok. -Original Message- From: Ranish George [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 5:10 PM To: Nath, Alok (STSD) Cc: Mumia W.; Beginners List Subject: Re: Same Internal Server Error from last two days Nath, Alo

Re: Same Internal Server Error from last two days

2006-07-28 Thread Dr.Ruud
Ranish George schreef: > Have you tried changing the shebang line as I have mentioned in > one of the follow up. Trying changing the shebang to > > #!C:\Perl\bin\perl That should not make any difference. Windows doesn't use the shebang; perl reads it but is only interested in parameters (like -T

Re: Same Internal Server Error from last two days

2006-07-28 Thread Beginner
On 28 Jul 2006 at 14:13, Dr.Ruud wrote: > Ranish George schreef: > > > > Have you tried changing the shebang line as I have mentioned in > > one of the follow up. Trying changing the shebang to > > > > #!C:\Perl\bin\perl > > That should not make any difference. Windows doesn't use the shebang;

RE: Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
No the script is in C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin. -Original Message- From: Beginner [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 6:01 PM To: beginners@perl.org Subject: Re: Same Internal Server Error from last two days On 28 Jul 2006 at 14:13, D

Re: Same Internal Server Error from last two days

2006-07-28 Thread Dennis G. Wicks
On Fri, 28 Jul 2006, Dr.Ruud wrote: > Date: Fri, 28 Jul 2006 14:13:48 +0200 > From: Dr.Ruud <[EMAIL PROTECTED]> > To: beginners@perl.org > Subject: Re: Same Internal Server Error from last two days > > Ranish George schreef: > > > > Have you tried changing the shebang line as I have mentioned i

Re: Same Internal Server Error from last two days

2006-07-28 Thread Mumia W.
On 07/28/2006 06:46 AM, Nath, Alok (STSD) wrote: From: Ranish George [EMAIL PROTECTED] Hi Alok, Have you tried changing the shebang line as I have mentioned in one of the follow up. Trying changing the shebang to #!C:\Perl\bin\perl -Ranish George Ramnish, I have tried that.

Re: httpd.conf problem restarting with additional directives

2006-07-28 Thread Tom Phoenix
On 7/28/06, Sastry <[EMAIL PROTECTED]> wrote: I am using IBM Http Server(IHS) and adding a Directive for awstat application to the httpd.conf. Please help me resolving this problem I recommend that you ask in a forum where the IBM Http Server is the topic. The topic of this list is Perl, an

Help in && control statement

2006-07-28 Thread Anoop Kurup
Hi, Can somebody explain to me what is the syntax error in the following code: 20 sub func() 21 { 22 my ($retension_period, $file_list) = @_; 23 my $file; 24 25 while(defined($file = glob("$file_list"))) 26 { 27-s $file && -M $file > $ret

Re: Same Internal Server Error from last two days

2006-07-28 Thread Dr.Ruud
"Dennis G. Wicks" schreef: > Apache requires the shebang line for cgi > scripts and it must point to perl. Unless you tell Apache to not look at the shebang. Open your httpd.conf file and uncomment the line that reads ScriptInterpreterSource registry You are now free to include *nix style sheba

Re: Same Internal Server Error from last two days

2006-07-28 Thread Dennis G. Wicks
On Fri, 28 Jul 2006, Dr.Ruud wrote: > "Dennis G. Wicks" schreef: > > > Apache requires the shebang line for cgi > > scripts and it must point to perl. > > Unless you tell Apache to not look at the shebang. > > Open your httpd.conf file and uncomment the line that reads > ScriptInterpreterSource r

Function to convert UTC to Epoch

2006-07-28 Thread S.A. Birl
Was wondering if the there's a function to convert UTC time to Epoch time? Thanks Birl Please do not CC me responses to my own posts. I'll read the responses on the list. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <

Re: Help in && control statement

2006-07-28 Thread Tom Phoenix
On 7/28/06, Anoop Kurup <[EMAIL PROTECTED]> wrote: 27-s $file && -M $file > $retension_period && { print "File name is: $file\n"; print "File found\n"; } That expression should probably be written out as an if-block for clarity. But I think you'll fix the syntax error if you add th

Re: Function to convert UTC to Epoch

2006-07-28 Thread Joshua Colson
On Fri, 2006-07-28 at 10:51 -0400, S.A. Birl wrote: > Was wondering if the there's a function to convert UTC time to Epoch > time? Have you checked CPAN? Here is the first result from a search for 'epoch': http://search.cpan.org/~pijll/DateTime-Format-Epoch-0.10/lib/DateTime/Format/Epoch.pm HTH

RE: Dynamically choosing CGI file based on form output

2006-07-28 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 The first time the script through the 'select' field

RE: Help in && control statement

2006-07-28 Thread Anoop Kurup
Hi Tom, Yes that worked. Thanks a lot. Cheers, Anoop -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix Sent: Friday, July 28, 2006 8:26 PM To: Anoop Kurup Cc: beginners@perl.org Subject: Re: Help in && control statement On 7/28/06, Anoop K

Re: Help in && control statement

2006-07-28 Thread Dr.Ruud
"Anoop Kurup" schreef: > while(defined($file = glob("$file_list"))) while ( defined($file = glob $file_list) ) > -s $file && -M $file > $retension_period && { print... ;} -s $file and -M $file > $retension_period and print... ; -- Affijn, Ruud "Gewoon is een tijger." -- To unsu

Re: sending output to file

2006-07-28 Thread tom arnall
On Thursday 27 July 2006 05:02 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. could you give us an example of a command whose output you would like to send to a file? tom arnall nort

Function to convert GMT to Epoch (Was Re: Function to convert UTC to Epoch)

2006-07-28 Thread S.A. Birl
On Jul 28, 2006, Joshua Colson ([EMAIL PROTECTED]) typed: Joshua: On Fri, 2006-07-28 at 10:51 -0400, S.A. Birl wrote: Joshua: > Was wondering if the there's a function to convert UTC time to Epoch Joshua: > time? Joshua: Joshua: Have you checked CPAN? Here is the first result from a search for

Re: Help in && control statement

2006-07-28 Thread Rob Dixon
Anoop Kurup wrote: > > Can somebody explain to me what is the syntax error in the following > code: > > > 20 sub func() > 21 { > 22 my ($retension_period, $file_list) = @_; > 23 my $file; > 24 > 25 while(defined($file = glob("$file_list"))) > 26 { >

Re: Function to convert GMT to Epoch (Was Re: Function to convert UTC to Epoch)

2006-07-28 Thread S.A. Birl
Time::Local will do what I want. On Jul 28, 2006, S.A. Birl ([EMAIL PROTECTED]) typed: Return-Path: <[EMAIL PROTECTED]> Date: Fri, 28 Jul 2006 12:32:34 -0400 (EDT) From: S.A. Birl <[EMAIL PROTECTED]> To: beginners@perl.org Subject: Function to convert GMT to Epoch (Was Re: Funct

RE: Dynamically choosing CGI file based on form output

2006-07-28 Thread Charles K. Clarkson
Charles K. Clarkson wrote: : The first time the script through the 'select' field is empty Whoopsie! The first time through the script the 'select' field is empty -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to split a file on the CR carriage Return and/or replace the \r with \n ??

2006-07-28 Thread Steve Pittman
Thanks to everyone for your suggestions I replaced the INPUT_RECORD_SEPARATOR ($/) as suggested My script is working great!! Thanks Very Much!!! Steve >>> Robert Citek <[EMAIL PROTECTED]> 7/26/2006 5:06 PM >>> On Jul 26, 2006, at 2:59 PM, Steve Pittman wrote: > I am using activestate o

Re: How to split a file on the CR carriage Return and/or replace the \r with \n ??

2006-07-28 Thread Dr.Ruud
Robert Citek schreef: > Try a different value for the INPUT_RECORD_SEPARATOR ($/): > > $/ = "\n" ; (spaces added for clarity) Is that different from the default? (see perlvar) -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Re: queuing up user input via writes to STDIN

2006-07-28 Thread Michael Gale
What about something like this: #!/usr/bin/perl use Term::ReadKey; my @data; ReadMode 1; # Turn off controls keys my $count=1; while ($count < 10) { my $key = ReadLine(0); if ($key =~ m/Done/) { $count=12 } else { push(@data,"$key"); } } ReadMode 0; # Reset tty mode before exiting

Re: How to split a file on the CR carriage Return and/or replace the \r with \n ??

2006-07-28 Thread Joshua Colson
On Fri, 2006-07-28 at 21:28 +0200, Dr.Ruud wrote: > Robert Citek schreef: > > > Try a different value for the INPUT_RECORD_SEPARATOR ($/): > > > > $/ = "\n" ; > > (spaces added for clarity) > > Is that different from the default? > (see perlvar) Using ActiveState on Windows it is. -- Joshua C

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

2006-07-28 Thread Michael Gale
Hello, Here is what I currently do to accept file uploads from users via http: #!/usr/bin/perl -w use CGI; $upload_dir = "/tmp"; $query = new CGI; $filename = $query->param("fname"); $filename =~ s/.*[\/\\](.*)/$1/; ## $upload_filehandle = $query->upload("fupload"); if ( $filename =

Re: How to split a file on the CR carriage Return and/or replace the \r with \n ??

2006-07-28 Thread Xavier Noria
On Jul 28, 2006, at 9:50 PM, Joshua Colson wrote: On Fri, 2006-07-28 at 21:28 +0200, Dr.Ruud wrote: Robert Citek schreef: Try a different value for the INPUT_RECORD_SEPARATOR ($/): $/ = "\n" ; (spaces added for clarity) Is that different from the default? (see perlvar) Using ActiveState

regex quoting

2006-07-28 Thread Jeremy Kister
perldoc -q quote talks about \Q before a regex to escape special characters. how do you use \Q when you want to anchor the regex with a dollar sign ? my $string = my $regex = "foo"; print "match\n" if($string =~ /^\Q${regex}$/); -- Jeremy Kister http://jeremy.kister.net./ -- To unsubscribe

Re: How to split a file on the CR carriage Return and/or replace the \r with \n ??

2006-07-28 Thread Joshua Colson
On Fri, 2006-07-28 at 22:00 +0200, Xavier Noria wrote: > That's wrong. > > $/ is eq "\n" everywhere, and "\n" has length 1 everywhere. "\n" is > eq "\012" in all systems except MacOS pre-X where it is eq "\015". In > particular "\n" is *not* CRLF on Windows. > > My article about newlines is m

Re: regex quoting

2006-07-28 Thread Tom Phoenix
On 7/28/06, Jeremy Kister <[EMAIL PROTECTED]> wrote: how do you use \Q when you want to anchor the regex with a dollar sign? I think you're looking for \E, which "ends" the section of the string quoted via \Q. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail:

Re: regex quoting

2006-07-28 Thread Mumia W.
On 07/28/2006 03:01 PM, Jeremy Kister wrote: perldoc -q quote talks about \Q before a regex to escape special characters. how do you use \Q when you want to anchor the regex with a dollar sign ? my $string = my $regex = "foo"; print "match\n" if($string =~ /^\Q${regex}$/); \E enables nor

Re: regex quoting

2006-07-28 Thread Rob Dixon
Jeremy Kister wrote: > > perldoc -q quote talks about \Q before a regex to escape special > characters. > > how do you use \Q when you want to anchor the regex with a dollar sign ? > > my $string = my $regex = "foo"; > print "match\n" if($string =~ /^\Q${regex}$/); \E marks the end of the string

RE: regex quoting

2006-07-28 Thread Timothy Johnson
Use \E to stop the quoting. -Original Message- From: Jeremy Kister [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 1:01 PM To: beginners@perl.org Subject: regex quoting perldoc -q quote talks about \Q before a regex to escape special characters. how do you use \Q when you want to

Re: regex quoting

2006-07-28 Thread John W. Krahn
Jeremy Kister wrote: > perldoc -q quote talks about \Q before a regex to escape special > characters. > > how do you use \Q when you want to anchor the regex with a dollar sign ? > > > my $string = my $regex = "foo"; > print "match\n" if($string =~ /^\Q${regex}$/); print "match\n" if $string =