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

2003-01-08 Thread Wiggins d'Anconia
Christopher D. Lewis wrote: > Can you direct me to a resource which will help me to see what needs to happen here? Start here: http://perl.plover.com/FAQs/Namespaces.html perldoc -f my perldoc -f our as the others have mentioned 'strict' is your friend (to put it lightly). http://danconi

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

2003-01-08 Thread R. Joseph Newton
Hi Christopher, Declarations within loops can be tricky. I pretty much try to avoid them. If I need a variable within any kind of loop, I declare it before entering the loop. This may or may not be necessary, but it makes sense until or unless I am certain that, for instance while( my $Test+

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

2003-01-08 Thread Rob Dixon
"John W. Krahn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > my @rawRollArray = roll(@currentRollRequest); # produces raw roll array > > from roll request array > > while @rawRollArray { >^^^ > You are missing the parenthesis around th

Re: Debugging Problem: Phantom line numbers!

2003-01-08 Thread John W. Krahn
"Christopher D . Lewis" wrote: > > ... and I have no idea what an explicit package name is :-) At your > request, I have placed the whole, ugly thing at > www.PuckU.org/misc/nudice-01c for inspection of why Perl thinks the > line numbers are as it reports ... I apologize in advance for the > prog

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

2003-01-08 Thread John W. Krahn
"Christopher D . Lewis" wrote: > > 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

Re: Debugging Problem: Phantom line numbers!

2003-01-08 Thread John W. Krahn
"Christopher D . Lewis" wrote: > > 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 u

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 Peter Scott
At 06:16 PM 1/7/03 -0600, Christopher D. Lewis wrote: >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 ha

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread R. Joseph Newton
Good tip, Peter, Joseph Peter Scott wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Christopher D . Lewis) writes: > > > >On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote: > > > >> [EMAIL PROTECTED] (Christopher D . Lewis) writes: > >>> My problem is that the errors P

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Rob Dixon
Hi Chris Simplifying sub displayResults is a Good Thing. It should actually be: sub displayResults { print __LINE__ . "sub displayResults\n"; } but it should compile as it is, yet the parser's still complaining about it. I would guess that there's something wrong with the lines immediately p

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christopher D . Lewis) writes: > >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

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christopher D . Lewis) writes: > >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 erro

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, near "sub rollRequest

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

Re: Debugging Problem: Phantom line numbers!

2003-01-07 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Christopher D . Lewis) writes: >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

RE: Phantom Line Numbers

2003-01-07 Thread Dan Muey
Do you 'require' or 'use' any libs or modules? -Original Message- From: Christopher D. Lewis [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 2:30 PM To: [EMAIL PROTECTED] Subject: Phantom Line Numbers I'm writing a little toy tool to teach myself mo

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