Hello,

I believe you don't need the /g modifier in that regexp since a single
match to an unwanted character is enough.

Aziz,,,

In article
<[EMAIL PROTECTED]>,
"Wagner-David" <[EMAIL PROTECTED]> wrote:

> Here is some code which does what you want:
> 
> #!perl -w
> # A-Za-z0-9_@.-
> 
> while ( 1 ) {
>    printf "Please enter data: ";
>    chomp(my $Input = <STDIN>);
>    last if ( $Input=~ /^ex/i );
>    if ( $Input =~ /[^\w\d\_@.\-\s]/g ) {
>       printf "You entered something other than the following:\n"; printf
>       " A-Z a-z 0-9 _ \@ . -\n";
>       printf "You entered: <$Input>\n";
>       printf "Correct and re-enter\n";
>     }else {
>       printf "Good data entered!\n";
>     }
>  }
> 
> Wags ;)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to