Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Searching Strings for Charactersby Anonymous Monk |
on Jun 04, 2002 at 02:04 UTC ( [id://171380]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have created a form that will cut off the string if it reaches over 50 characters long, but if someone were to press spacebar 50 times, the string will become 50 white spaces and this is a problem.
So here are a few solutions I have decided on (if you have a better one please tell), 1.) I could try to detect a string with empty characters in it an no characters at all 2.) Cut off all empty spaces before the actual word and all the empty spaces after the acutal word 3.) Find out a way to find if a string is just empty *any others? if you guys don't get my question just post, thanks a lot, perl monks are "uber"
Back to
Seekers of Perl Wisdom
|
|