Re: Help with Debugging

2001-11-17 Thread tom poe
On Saturday 17 November 2001 13:43, Jeff 'japhy' Pinyan wrote: > > Ok. First, you're missing a space between 'sub' and 'replace'. COMMENT: Didn't catch that. Second, > you're using 'use' in a very wrong way. COMMENT: Didn't catch that. Will look that up. Third, you never defined $ref.

Re: Help with Debugging

2001-11-17 Thread Jeff 'japhy' Pinyan
On Nov 17, Sherri said: >#!/usr/bin/perl -w >#This program replaces cm398p with cm498p >use strict; >@Classes = ("cm140", "cm325", "cm398p"); >subreplace >{ >use $ref -> [X] = "cm498p" >} >replace (/@Classes); >print @Classes; Ok. First, you're missing a space between 'sub' and 'replace'. Seco

Re: Help with Debugging

2001-11-17 Thread Paul Johnson
On Sat, Nov 17, 2001 at 12:40:18PM -0800, Richard S. Crawford wrote: > You forgot the semicolon: > > sub replace > { > use $ref -> [X] = "cm498p"; > } Actually, the semicolon is not required on the last statement in a block. > At 12:01 PM 11/17/2001, Sherri wrote: > >#!/usr/bin/perl -w

Re: Help with Debugging

2001-11-17 Thread tom poe
On Saturday 17 November 2001 12:01, Sherri wrote: > > I am having problems debugging this program. It keeps saying there's an > error in line 5 near '(' > > Here's the code: > > #!/usr/bin/perl -w > #This program replaces cm398p with cm498p > use strict; > @Classes = ("cm140", "cm325", "cm398p");

Re: Help with Debugging

2001-11-17 Thread Richard S. Crawford
You forgot the semicolon: sub replace { use $ref -> [X] = "cm498p"; } At 12:01 PM 11/17/2001, Sherri wrote: >#!/usr/bin/perl -w >#This program replaces cm398p with cm498p >use strict; >@Classes = ("cm140", "cm325", "cm398p"); >subreplace >{ >use $ref -> [X] = "cm498p" >} >replace (/@Cl

Help with Debugging

2001-11-17 Thread Sherri
I am having problems debugging this program. It keeps saying there's an error in line 5 near '(' Here's the code: #!/usr/bin/perl -w #This program replaces cm398p with cm498p use strict; @Classes = ("cm140", "cm325", "cm398p"); subreplace { use $ref -> [X] = "cm498p" } replace (/@Classes); prin