Ramprasad A Padmanabhan <[EMAIL PROTECTED]> wrote:
> I am sure this must have been asked before But I cant find it
>
> How do I find if
> $str has any special chars ( I mean above 127 in the ascii range )
>
> I do not want to do an ord of each character
>
> like while($str=~/(.)/g) { return('found') if(ord($1) > 127) }
>
Assuming bytes:
return "found" if $str =~ /[\x80-\xff]/;
--
Steve
perldoc -qa.j | perl -lpe '($_)=m("(.*)")'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]