[EMAIL PROTECTED] wrote:
> Since, everyone is so lively today, I'm going to push my luck today with
> this list. I need a little help here with validating a string to have only
> characters that I want, A-z and _ (underscore).
>
> So, this is what I'm stuck on:
In what way are you stuck?
>
>
> #
can you add a check length into a oneliner but w/o the $_[0]?
Also, is this correct and I guess to be consistent since the A-z test
didn't have the explicit reference to $_[0].:
sub isValidChars { return length($_[0]) > 4 && shift =~ /^[A-Za-z_.]+$/ }
> On Sep 29, [EMAIL PROTECTED] said:
>
>>Sinc
Lots of good stuff here. This oneliner is what makes perl cool but it's
like speaking in tongue -:)
> sub isValidChars { shift =~ /^[A-Za-z_]+$/ }
Thanks,
-rkl
> On Sep 29, [EMAIL PROTECTED] said:
>
>>Since, everyone is so lively today, I'm going to push my luck today with
>>this list. I need
On Sep 29, [EMAIL PROTECTED] said:
>Since, everyone is so lively today, I'm going to push my luck today with
>this list. I need a little help here with validating a string to have only
>characters that I want, A-z and _ (underscore).
You'll want to use a regular expression, or perhaps just the tr