in reply to Help! Stuck on methods to count file size.
open my $fh, $filin || die $!;
is not the best way to open a file (check the precedence of operators). Try this:
open my $fh, "<", $filin or die $!;or:
open (my $fh, "<", $filin) || die $!;
In Section
Seekers of Perl Wisdom