in reply to A question of logic and syntax
Did you try to find an answer yourself? Does not really look like it. But I'm in a good mood, and killing time until my wife comes home....
To answer your first question: substr.
Nice, isn't it?
print "'$str' starts with lowercase\n!" if substr($str,0,1) =~ /[a..z] +/;
For the second, where do you live? What kind of phonenumbers will you accept? International?
print "Only -+()0..9 allowed!\n" if $str =~ /[^+-()0..9]/;
/me hopes this helps you learn....
Jeroen
"We are not alone"(FZ)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A question of logic and syntax
by blackjudas (Pilgrim) on Apr 27, 2001 at 22:52 UTC |