> if (!($icname =~ /^[$allow]+$/)) { > print "your IP-Block name cannot contain special characters\n"; > print "we do not like <$1> \n" while ( $icname > =~ m/([^$allow])/g); > }
You could use the !~ operator to negate this automatically and print it in a one-shot, like so: if($icname !~ /^[$allow]+$/) { my @invalid = (); push @invalid, $1 while $icname =~ m/([^$allow])/g; print "your IP-Block name cannot contain special characters\n"; print "we do not like [@invalid]\n"; } Cheers, -dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]