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. COMMENT: Caught that. But, my weak attempt to see if I could define it wasn't even close: my $ref = 0; > Fourth, what is X? COMMENT: I had not the foggiest idea, either. Fifth, you have /@Classes instead of \@Classes. COMMENT: Didn't catch that. > > Oh, and since you're using strict, @Classes must be declared with 'my'. COMMENT: Didn't catch that. > > Here's what I think your code was supposed to be: > > #!/usr/bin/perl -w > > use strict; > > my @Classes = ("cm140", "cm325", "cm398p"); > > sub replace { > my $ref = $_[0]; > $ref->[2] = "cm498p"; > } > > replace(\@Classes); > print @Classes; I changed the last line to: print "@Classes\n"; 'cause it outputs cleaner on my terminal. TOTAL: - - - I better stay with being in charge of going to get the key to the batter's cage for a while longer, I guess. <grin> Thanks, japhy Thanks, Sherri. Tom -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]