Why ask why? Just use the following code to get rid of the extra line breaks:
chomp($sector);
If you really need to ask why, without looking at the rest of your code, a good guess would be that a visitor to your website would have to type enter or return to have the program accept the input...
Use a cookie to save a time stamp. If they try to re-submit the form, you'll know and can prevent re-submission.
Time stamp:
($Second,$Minute,$Hour,$Day,$Month,$Year,$WeekDay,$DayOfYear,$IsDST) = localtime(time);
Cookie:
print "Set-Cookie:tstamp=$Second$Minute$Hour$Day$Month$Year...
Hi,
Use something like this to send the email:
open(MAIL, "|/usr/sbin/sendmail -t")||&ErrorMessage;
print MAIL"To: $sendmail1\@$sendmail2 \nFrom: support\@mywebsite.com\nSubject: mywebsite.com private message sent\nYour private message to $recipient has been sent\n\n$pm \n";
close(MAIL);
Be...
Thanks duncdude!
You set me on the right track!!! I thought that it was a hexadecimal conversion to ascii thing, doh!!!
The URLs used sometimes has many forward slashes in it, so that snippet of code didn't work, BUT you set me on the right track (thanks!!!) so I was able to do the following...
Hi,
I have a cgi program written in PERL that takes a URL from an online form and then it writes the URL to a file. However, the colon and two forward slashes get turned into percent 3A percent 2F percent 2F. How do I fix it so I just get a normal URL? Thank you for your help. Below is the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.