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
> >#This program replaces cm398p with cm498p
> >use strict;
> >@Classes = ("cm140", "cm325", "cm398p");

You'll need my @Classes ....

> >subreplace

sub replace

> >{
> >use $ref -> [X] = "cm498p"

I'm not sure what you're doing here, but you you know that "use" is
Perl's way of importing external libraries, right?

Where does $ref come from?  Looks like it should be a reference to an
array.  And what is X?  At the moment it is a bareword.  That's not
good.

> >}
> >replace (/@Classes);
> >print @Classes;

You probably want to do print "@Classes\n";

> 
> 
> Sliante,
> Richard S. Crawford

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to