in reply to bewildering array element problem
Tie::File just makes this so much easier.
type junk.dat the quick brown fox jumps over the lazy dog PAPBT.ROW PAPBT.ROW MORE STUFF PAPBT.ROW stuff the quick brown fox jumps over the lazy dog PAPBT.ROW stuff PAPBT.ROW MORE STUFF jumps over the lazy dog jumps over the lazy dog the quick brown fox the quick brown fox jumps over the lazy dog jumps over the lazy dog PAPBT.ROW MORE STUFF PAPBT.ROW perl -mTie::File -e"tie @a,'Tie::File',$ARGV[ 0 ]; @a = grep!/^PAPBT.R +OW/,@a" junk.dat type junk.dat the quick brown fox jumps over the lazy dog the quick brown fox jumps over the lazy dog jumps over the lazy dog jumps over the lazy dog the quick brown fox the quick brown fox jumps over the lazy dog jumps over the lazy dog
|
|---|