This works well, except that it also accepts space(' ') as a valid character. I've also tried to use join ('', @a) but it gives the same results. Can anyone explain to me why this happens? Thanks.@a = ( 'a', 'x', 'z' ); # simplified array while(<>) { print if(/^[@a]{3}$/); }
In reply to Character class in an array by nikto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |