use strict;
use warnings;
 # http://paulbourke.net/dataformats/volumetric/
 
my $filename = 'out.vol';
open(my $fh, '<:encoding(UTF-8)', $filename)
  or die "Could not open file '$filename' $!";
 my $count = 0;
while (my $row = <$fh>) {
  chomp $row;
  print "$row\n";
  last if ++$count == 5;
}
