Re: Compound if statement.

2003-01-30 Thread Christopher D. Lewis
On Thursday, January 30, 2003, at 09:33 AM, Duane Koble wrote: I am working on a program that requires that three statement be true in order to set a hash. The problem I am having is getting the if statement to work correctly. I seems to me that if two of the statements are true it proceeds

Re: How do I test a variable to see if it is a scalar or a hash?

2003-01-24 Thread Christopher D . Lewis
On Thursday, January 23, 2003, at 11:43 AM, Ken Lehman wrote: How do I test a variable to see what type of variable it is(scalar, array, hash, etc...)? What I am trying to accomplish is I have a hash and some values are scalar data and some values are nested hashes and I need a way to tell th

Re: perl and progress database.

2003-01-23 Thread Christopher D . Lewis
NOT Abandoned!! Very active! On Wednesday, January 22, 2003, at 12:54 PM, Bob Showalter wrote: Ben Siders wrote: Yes. DBI has support for PostgreSQL. You can perform almost any transaction through it that you would at the command line. Gerardo wrote: i want to know if i can to run perl wit

Re: perl and progress database.

2003-01-22 Thread Christopher D . Lewis
On Wednesday, January 22, 2003, at 12:40 PM, Gerardo wrote: i want to know if i can to run perl with the dbi module and to view a Progress database. DBI:: lets you get data into and out of databases, though you need DBI::Pg to interface with PostgreSQL. Search CPAN for perl modules to get y

Size of number in scalar

2003-01-22 Thread Christopher D . Lewis
Someone posted a question as to the size of number which a scalar would tolerate. When I wanted to know what size boundaries I faced in certain variable types in C, I wrote a little program that added 1 to a variable until n+1 was less than n, at which point I concluded the variable had been r

Re: Random Number Generation

2003-01-15 Thread Christopher D . Lewis
On Wednesday, January 15, 2003, at 08:28 AM, Maurice O'Prey wrote: How do I extract a whole number from the rand function. int() is your friend, if you want an integer from rand. I am using rand 25000; which generates a random number with many decimal places, e.g. 16235.2587965, I need a wh

Re: Phantom line numbers! (line numbers fixed; now, masking earlier declarations of variables??)

2003-01-08 Thread Christopher D . Lewis
On Tuesday, January 7, 2003, at 09:02 PM, Peter Scott wrote: You made a false economy by not using strict. Yes, you would have to fix those errors - mostly due to not declaring *everything* with 'my'. But to leave it out is to shoot yourself in the foot. You have managed to blow your whole le

Re: Debugging Problem: Phantom line numbers!

2003-01-08 Thread Christopher D . Lewis
On Tuesday, January 7, 2003, at 11:19 AM, Peter Scott wrote: [responding to replacement of sub displayResults with {print __LINE__ . " sub displayResults";}] That needs to be __LINE__, not __line__. The above is an error. You do have -w and use strict in this program, right? When I use "__LI

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Christopher D . Lewis
On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote: [EMAIL PROTECTED] (Christopher D . Lewis) writes: My problem is that the errors Perl coughs up end with: syntax error at ./nudice-01c line 187, near "sub displayResults " syntax error at ./nudice-01c line 305,

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Christopher D . Lewis
On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote: What line numbers do your text editors say the above statements are actually on? the errors Perl coughs up end with: syntax error at ./nudice-01c line 187, near "sub displayResults " the text "sub displayResults " occurs on line

Phantom Line Numbers

2003-01-07 Thread Christopher D . Lewis
I'm writing a little toy tool to teach myself more Perl than I have used before, and I am puzzled by error messages I get when trying to run and debug it: syntax error at ./nudice-01c line 187, near "sub displayResults " syntax error at ./nudice-01c line 305, near "sub rollRequest" syntax error

Debugging Problem: Phantom line numbers!

2003-01-07 Thread Christopher D . Lewis
Dear all, I'm writing (as a practice piece, all the better to learn Perl coding) what is for me a big, complicated program which has lots of options and output possibilities. And ... heh, heh ... it isn't working. My problem is that the errors Perl coughs up end with: syntax error at ./nudic

Phantom Line Numbers

2003-01-06 Thread Christopher D . Lewis
I'm writing a little toy tool to teach myself more Perl than I have used before, and I am puzzled by error messages I get when trying to run and debug it: syntax error at ./nudice-01c line 187, near "sub displayResults " syntax error at ./nudice-01c line 305, near "sub rollRequest" syntax error

Re: output help

2002-12-11 Thread Christopher D . Lewis
Does Word2000 understand Unicode? Does it default to trying to read Unicode, rather than ASCII or the like? I have used jEdit with success to read/write Unicode files. --Chris On Monday, December 9, 2002, at 02:30 PM, Raghupathy, Ramesh . wrote: Hi, I am using perl 5.8.0 for windows to

Re: Newest Version

2002-12-06 Thread Christopher D . Lewis
http://www.cpan.org/src/ links from that page get you where you want. Install directions linked from perl.org are at http://dev.perl.org/perl5/news/2002/07/18/580ann/INSTALL Best regards, Chris On Thursday, December 5, 2002, at 01:40 PM, Paul Kraus wrote: I see that the newest version of P

Re: Printing Japanese characters

2002-12-04 Thread Christopher D . Lewis
I have been playing with Perl 5.8.0 on MacOS X, and I've found it handles Unicode as well as I can detect. I think the hard part is likely to be making sure you have character sets which include the Japanese characters at the intended Unicode values. The reason I started playing with Unicode w

Re: a Bug in PERL

2002-12-02 Thread Christopher D . Lewis
Perhaps what the user intends is a WHILE loop. while (@lastnotpop) { $current_element = pop(@lastnotpop); print "Just Popped $current_element\n"; } This does what you want via pop. For a while loop, leave the array as it is, and just iterate through it. Enjoy, Chris On Monday, December 2, 200