my $file = 'sample.txt'; { local *FH; -f FH and sysread FH, my $file, -s FH; }