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

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon