View Single Post
  #11 (permalink)  
Old 03-14-2008, 12:46 AM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 89
Rep Power: 6
KevinADC is on a distinguished road
Default Re: Need a perl study-buddy

What happens if something besides 1 or 2 is entered as the option?

drop the -w switch from the shebang line. The warnings pragma is better:

use warnings;

Don't use parenthesis around print commands:

print ("You chose option 1. Enter your value below \n\n");

should be:

print "You chose option 1. Enter your value below \n\n";

print is not a function, using parenthesis can sometimes cause problems.
Reply With Quote