What you do here is first to substitute any whitespace characters by blanks, then all blanks by nothing and then you look for blank at the beginning and the end of your data. As your RegEx to validate input is $data =~ /^(-\@\w. +)$/, I would guess that you might have wanted to leave the second RegEx out.The second RegEx contains two spaces (not one), so what it does is remove extra spaces but one to nothing.
In reply to Re: Re: Check input sub - comments please...
by kiat
in thread Check input sub - comments please...
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |