in reply to Re: parsing/munging problems
in thread parsing/munging problems
This did exactly what i wanted it to do. After i got it to read the storenum, i had it read the date as well, which happened to be the second field on the first row. It then skipped the junk lines and wrote only what i needed to the new file. I'd like to thank everyone for helping me with my attempt at a question :) Nadadoggsub indextime{ open FILE, "<storedata.txt"; open OUTP, ">exporteddata.txt"; select STDOUT; while (<FILE>){ push @matrix, [split]; } # print $matrix[0][0]; $storenum = $matrix[0][0]; $date = $matrix[0][1]; @matrix[0] = undef; @matrix[1] = undef; @matrix[2] = undef; @matrix[3] = undef; select OUTP; for $i (6.. ($#matrix-1)){ print "@{$matrix[$i]} $storenum $date\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: parsing/munging problems
by Hofmator (Curate) on Feb 26, 2003 at 13:18 UTC | |
by nadadogg (Acolyte) on Feb 26, 2003 at 18:38 UTC | |
by nadadogg (Acolyte) on Mar 04, 2003 at 22:52 UTC | |
by Hofmator (Curate) on Mar 05, 2003 at 11:52 UTC |