in reply to Array question

Keep a hash of $File entries you've seen. You'll have to mangle them to make sure that algiz and algiz-r use the same key, but that's pretty easy.

my %seen; while (<FILE>) { chomp; my ($file, $name, $keyword) = split( /:/, $_, 3 ); (my $filekey = $file) =~ s/-r$//; next if $seen{$filekey}++; ($File[$i], $Name[$i], $Keywords[$i]) = ( $file, $name, $keyword ) +; $i++; }