Re: figuring out if a number/character string is null in Perl

2006-08-31 Thread Jay Savage
On 8/30/06, Mary Anderson <[EMAIL PROTECTED]> wrote: Hi All, I know this isn't strictly a cgi problem, but it is arising in a cgi application. I have a loop which reads certain fields, hashed on names. Some of my fields hold character strings, some hold numbers. Sometimes the number field i

Re: Trouble with variable scoping

2006-08-31 Thread Randy W. Sims
John W. Krahn wrote: Randy W. Sims wrote: Roman Daszczyszak wrote: In my perl script, I have a "global" variable called @excludedIPAddresses, declared at the top of the script using my: [...] When I run this, I get an error "Can't localize lexical variable". I understand that it's because th

Re: Trouble with variable scoping

2006-08-31 Thread John W. Krahn
Randy W. Sims wrote: > Roman Daszczyszak wrote: >> In my perl script, I have a "global" variable called >> @excludedIPAddresses, declared at the top of the script using my: > [...] >> >> When I run this, I get an error "Can't localize lexical variable". I >> understand that it's because the variab

Re: Trouble with variable scoping

2006-08-31 Thread Randy W. Sims
Roman Daszczyszak wrote: In my perl script, I have a "global" variable called @excludedIPAddresses, declared at the top of the script using my: [...] When I run this, I get an error "Can't localize lexical variable". I understand that it's because the variable is declared using "my"; what I d

Re: 'use strict' and filehandles

2006-08-31 Thread Ted Fines
--- Original Message --- > Ted Fines wrote: > > Hi, > > Hello, > > > I'm running into a Cach-22 with 'use strict', and filehandles. > > > > I have a program which opens two log files at the beginning: > > open(INFLOG,">>$info_log") || die "Could not append to $info_log_file. > > Quitting.\n";

Re: 'use strict' and filehandles

2006-08-31 Thread John W. Krahn
Ted Fines wrote: > Hi, Hello, > I'm running into a Cach-22 with 'use strict', and filehandles. > > I have a program which opens two log files at the beginning: > open(INFLOG,">>$info_log") || die "Could not append to $info_log_file. > Quitting.\n"; > open(ERRLOG,">>$error_log") || die "Could n

Help with rotating logs

2006-08-31 Thread binu sam
Hi, I am trying to write a script that can take log files in /var/log to a different directory (/opt/backup) every week. Each week it has to deposit the logs on a seperate directory with proper dates Can anyone has a script for this Thanks

RE: 'use strict' and filehandles

2006-08-31 Thread Timothy Johnson
If you want to pass a filehandle like that I would recommend using the FileHandle module. As your script stands, however, you have no reason to pass the filehandle to the subroutine. You can just do a "print ERRLOG $scalar" to print. -Original Message- From: Ted Fines [mailto:[EMAIL

'use strict' and filehandles

2006-08-31 Thread Ted Fines
Hi, I'm running into a Cach-22 with 'use strict', and filehandles. I have a program which opens two log files at the beginning: open(INFLOG,">>$info_log") || die "Could not append to $info_log_file. Quitting.\n"; open(ERRLOG,">>$error_log") || die "Could not append to $error_log_file. Quittin

Re: what is wrong with my script

2006-08-31 Thread Joshua Colson
On Thu, 2006-08-31 at 11:09 -0700, chen li wrote: > Hi guys, > > I have a CGI script to process some data from the > visitors. The input data takes this format(row x > column): > 1 2 4 5 6 7 > 100 90 50 30 20 0 > > After processing I want to print

what is wrong with my script

2006-08-31 Thread chen li
Hi guys, I have a CGI script to process some data from the visitors. The input data takes this format(row x column): 1 2 4 5 6 7 100 90 50 30 20 0 After processing I want to print out the result in the same format(row x column). But when I ran

RE: Totally lost - need a starting point

2006-08-31 Thread Helen
- Original Message - From: "Mumia W." <[EMAIL PROTECTED]> To: "Beginners List" Sent: Thursday, August 31, 2006 11:29 AM Subject: [Bulk] Re: Totally lost - need a starting point > On 08/31/2006 08:24 AM, Helen wrote: > > - Original Message - > > From: "Charles K. Clarkson" <[EMA

Re: File locking issue

2006-08-31 Thread Tom Phoenix
On 8/31/06, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote: What I am seeing is when I enable the file locking commands the file is completely wiped out.Just zero bytes. #use lock to write into the file sysopen( FH, $registerFile, O_RDWR )

Re: File locking issue

2006-08-31 Thread John W. Krahn
Nath, Alok (STSD) wrote: > Hi, Hello, > I am trying to save data in an xml file. > What I am seeing is when I enable the file locking commands > the file is completely wiped out.Just zero bytes. > > But it works correctly when I remove the file locking commands. > > Please help ?? What I

Re: Totally lost - need a starting point

2006-08-31 Thread Mumia W.
On 08/31/2006 08:24 AM, Helen wrote: - Original Message - From: "Charles K. Clarkson" <[EMAIL PROTECTED]> To: Sent: Wednesday, August 30, 2006 10:16 PM Subject: [Bulk] RE: Totally lost - need a starting point Helen wrote: I am starting from scratch again reading the manual more comp

Re: Trouble with variable scoping

2006-08-31 Thread Mumia W.
On 08/31/2006 08:19 AM, Roman Daszczyszak wrote: In my perl script, I have a "global" variable called @excludedIPAddresses, [...] my @excludedIPAddresses = qw# 192.168.0.142 192.168.3.118 #;# [...] local @excludedIPAddresses = @excludedIPAddresses; [...] When I run this, I get an error "

RE: [Bulk] RE: Totally lost - need a starting point

2006-08-31 Thread Charles K. Clarkson
Helen wrote: : Yes I have a perl script running inside of the expect script, : which works fine. I need to find a way to call the expect : script and output the perl to the html page that is calling it. Perl needs to print to STDOUT to send information to the browser via CGI. Calling an Expe

RE: Trouble with variable scoping

2006-08-31 Thread Charles K. Clarkson
Roman Daszczyszak wrote: : In my perl script, I have a "global" variable called : @excludedIPAddresses, declared at the top of the script using : my. That sounds like a bad idea, but go on. : When I run this, I get an error "Can't localize lexical : variable". I understand that it's because

File locking issue

2006-08-31 Thread Nath, Alok (STSD)
Hi, I am trying to save data in an xml file. What I am seeing is when I enable the file locking commands the file is completely wiped out.Just zero bytes. But it works correctly when I remove the file locking commands. Please help ?? What I am doing

Re: CORE DUMP by script !!

2006-08-31 Thread Jay Savage
On 31 Aug 2006 07:44:51 -, neela madhab patro <[EMAIL PROTECTED]> wrote: Hi ,    One of my scripy (involves GDBM file operations) dumped core.I have the core file, but no idea what can I glean from that. I have tools like dbx and gdb but they need binaries along with the core file. So anyon

Re: CORE DUMP by script !!

2006-08-31 Thread Tom Phoenix
On 31 Aug 2006 07:44:51 -, neela madhab patro <[EMAIL PROTECTED]> wrote: One of my scripy (involves GDBM file operations) dumped core.I have the core file, but no idea what can I glean from that. The core file is useful if you're debugging perl itself, but generally not useful for debuggin

RE: Trouble with variable scoping

2006-08-31 Thread Moon, John
When I run this, I get an error "Can't localize lexical variable". I understand that it's because the variable is declared using "my"; what I don't understand is why, or what I should declare the variable as, since if I leave out "my" I get an error using "use strict". Maybe you want.. Use va

Re: [Bulk] RE: Totally lost - need a starting point

2006-08-31 Thread Helen
Yes I have a perl script running inside of the expect script, which works fine. I need to find a way to call the expect script and output the perl to the html page that is calling it. I found a version of expect for perl, but it didn't seem to be able to get the results that I was looking for, be

Trouble with variable scoping

2006-08-31 Thread Roman Daszczyszak
In my perl script, I have a "global" variable called @excludedIPAddresses, declared at the top of the script using my: use strict; use warnings; use Net::Ping; use Net::Netmask; use Net::NBName; use DBM::Deep; # User-configured variable declarations my @su

CORE DUMP by script !!

2006-08-31 Thread neela madhab patro
Hi ,    One of my scripy (involves GDBM file operations) dumped core.I have the core file, but no idea what can I glean from that. I have tools like dbx and gdb but they need binaries along with the core file. So anyone knows how to decipher the core file of a script.ThanksMadhab