in reply to subroutine to calculate multiplication tables

Two remarks:
  1. don't put a & before your subroutine call. Most of the times it is unnecessary, it does things you are clearly not aware of (see perlsub) and unless you know the few cases you need it, just don't do it.
  2. You don't need $i (or $ans) at all. Make your inner loop as follows: print $_*$loop, ' ' for 1 .. 10;

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James