Perl and CGI together eh? Well that is a hard match to pull off if you are new to programming
I would suggest looking through our tutorials. Many of the elder monks have written good stuff for doing things
However, looking at your code. Well unless my dyslexia is kicking in; you have your "N/A"s without quotes.
Start using "use strict" and "use warnings" they are your friends and will point out problems for you. Your NA issue would have been reported to you.
You made this harder then it needs to be. Why not simply read in the line, then have:
if ($comment1 eq " ") { $comment1 = "n/a"; } if ($comment2 eq " ") { $comment2 = "n/a"; }
Then you can have 1 print statement
Some friendly advice. Pick up either Learning Perl or Begining Perl. They should help you with some examples on doing things.
As I said Learning CGI and Learning Perl is hard to do at the same time. You probably should have gotten comfortable with Perl before doing the CGI class. Good luck and don't get discouraged. Perl is a fun language!
In reply to Re: Help ! New in perl and cgi
by Marza
in thread Help ! New in perl and cgi
by britney
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |