in reply to how to program my program to add random numbers?

1. use chomp instead of chop
2. don't calculate things that are not needed or used (get rid of statements before the prints).
3. follow the spec: just print result., e.g. print $x+$y,"\n";
4. if..elsif is fine to "shortcut" number of statements executed.
  • Comment on Re: how to program my program to add random numbers?