Hans Meier (John Doe) am Dienstag, 14. Februar 2006 21.35:
> if (/^\s*([A-Z][a-z])+\s*([A-Z][a-z])+\s*$/) {
> # input is ok, so now we format:
> my $formatted="$1 $2";
> do_something_with($formatted);
> }
Sorry, this is completely bullshit, shuld have tested before hitting send.
my $userinput=" Hans \n Meier ";
if ($userinput=~/^\s*([A-Z][a-z]+)\s+([A-Z][a-z]+)\s*$/) {
# input is ok, so now we format:
my $formatted="$1 $2";
print $formatted;
}
print $userinput;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>