sub ReadFile { #Declare Variables # my ($game, $file) = @_; my $dir = "$ENV{HOME}/settings/$game/$file"; #End if dir not exist # return unless -d $dir; #Read the file and create the array # open(FILE, $dir)||die("Cannot open file : $!"); my @contents = ; close(FILE); #Cut trailing \n # chomp (@contents); #Return the array # return @contents; }