Why use a regexp when you want equality?
if ( grep { $_ eq $system1 } @system_name ) { ...
Going back to the original question: This is a situation where a hash would be more appropriate:
my %system_name = ( box1 => 1, box2 => 1 ); # ... if ( $system_name{$system1} ) { ...
In reply to Re^2: array confusion
by edan
in thread array confusion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |