open(STATS, "/path/to/file") or die "Couldn't open file: $!"; my $line = scalar ; chomp $line; my %file = split /\|/, $line; close STATS;