nadadogg has asked for the wisdom of the Perl Monks concerning the following question:
I tried the $matrix[i][0] = undef, but that didn't do it.sub indextime{ open FILE, "<p2cash.prn"; open OUTP, ">p2cashmast.txt"; select STDOUT; undef (@matrix); while (<FILE>){ push @matrix, [split]; } $storenum = $matrix[0][0]; $date = $matrix[0][1]; #approx line 100 print "date $date \n "; print "store$storenum \n "; #@matrix[0] = undef; #@matrix[1] = undef; #@matrix[2] = undef; #@matrix[3] = undef; select OUTP; for $i (6.. ($#matrix-1)){ #$matrix[i][0] = $storenum; $matrix[i][0] = undef; print "@{$matrix[$i]} $storenum $date\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing data within a matrix
by jeffa (Bishop) on Feb 11, 2004 at 21:25 UTC | |
by nadadogg (Acolyte) on Feb 11, 2004 at 21:37 UTC | |
|
Re: Changing data within a matrix
by kelan (Deacon) on Feb 11, 2004 at 22:26 UTC |