in reply to Length validation
A reminder: HTML textfields have an optional maxlength attribute that determine the longest string they'll take. Dunno offhand about textareas (OK,looked it up. No corresponding restrictor there). I don't believe that these will help with POST submissions that don't actually go through the HTML form ('cos the client's responsible for honoring the maxlength attribute). But doing length checks and/or using substr to cut malefactors down to size is probably the best approach overall.
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'
|
|---|