You are using references unnecessarily; a hash would work just fine. I suspect what you probably want is something more like this:
#!/usr/bin/perl -w
use strict;
open(LANGUAGES,"languages.txt") or die "cannot open languages.txt";
my $line;
my %hash;
foreach $line (<LANGUAGES>) {
my ($language, $author) = split ', ', $line;
$hash{$language} = $author;
}
my $lang;
print "Enter a programming language: ";
chomp ($lang = <STDIN>);
if (exists $hash{$lang}) {
print "$lang was originally developed by $hash{$lang}.\n";
} else {
warn "Language not found!";
}
Originally posted as a Categorized Answer.