open (F, $file) or die "cannot open file"; my @lines = ; close F; #### use File::Slurp; my @array = read_file($filename);