in reply to Regex help
There's a maxlength attribute in HTML for text input fields, but not for textarea. If you want to limit a string to 1100 chars max after you've got it into a variable, then
$string = substr($string,0, 1100) if length $string > 1100;
oughta do. Moral of the story: not everything one does with a string ought to be implemented in regexes.
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"'
|
|---|