Thank you all for your help! It's not very pretty, it could use some work, but...it actually DOES work!
Here is my final if anyone is interested, and thanks again!
my %hash=();
open INPUT, "<project.txt";
open OUTPUT, ">>project.out";
while(<INPUT>) {
next unless /PW\#/io;
next if exists $hash{$'};
print OUTPUT "$'";
$hash{$'}=undef;
}
close INPUT;
close OUTPUT;
afasch01