$file="$ARGV[0]"; if (! -r $file ) { print STDERR "Usage "; exit(128); } sub percent { my ($number, $total) = @_; $percent = $number/$total * 100; return "(", int($percent), "%)"; }