Dear Monks, I need help with my perl code to read from a .txt file and print out in reverse order. Write a Perl program to read a file, and then print its lines in reverse order, the last line first. This is what I have so far but I am stuck and it would not work. What am I missing out
# Open a .txt file open(seq1, "<seq1.txt") or die $!; #Assign open files to arrays my @seq1 = <seq1>; print "@seq1"; print reverse @seq1;
In reply to Read reverse from a file by stamp1982
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |