joey___joey@yahoo.com
martha___martha@aol.com
####
open (IN, "filename.txt") or die "can't open filename.txt!";
while ( $line = ) {
@parts = split /___/, $line;
push @names, $parts[0];
push @addresses, $parts[1];
}
close IN;
##
##
$names[0]
##
##
$addresses[0]
##
##
open (IN, "filename.txt") or die "can't open filename.txt!";
while ( $line = ) {
@parts = split /___/, $line;
$name = $pts[0];
$address = $pts[1];
$hash{$name} = $address;
}
close IN;
##
##
print "joey's address is ", $hash{"joey"}, ".\n";