# slurp in file into a string $/=''; $DNA = <FILE>; # remove \n at end chomp($DNA);
You have set $/ to paragraph mode so it will not "slurp in file", just the first paragraph of the file. Also the value of $/ will effect what chomp removes (hint: paragraph mode removes more than just a single \n character).
# replace line endings with commata $DNA =~ s/\n/,/;
That replaces a single newline. If you want to replace ALL newlines then:
# replace newlines with commas $DNA =~ s/\n/,/g;
Or perhaps:
# replace newlines with commas $DNA =~ tr/\n/,/;
In reply to Re^2: How can one get all possible combinations of elements of different arrays using File::Glob(bsd_glob)?
by jwkrahn
in thread How can one get all possible combinations of elements of different arrays using File::Glob(bsd_glob)?
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |