in reply to Re^2: count lines, bottom to top
in thread count lines, bottom to top

You obviously have other issues with hamdling files and the words of our sage monks has given the clues there. As for reversing the order of arrays:
#!/usr/bin/perl -w use strict; use warnings; my @array1 = (1, 2, 3, 4, 5); my @array2 = reverse( @array1 ); print join(", ", @array1), "\n"; print join(", ", @array2), "\n"; exit;
jdtoronto