for ( @addresses ) { if ( /.../ ) { # Fill in really cool regexp here print "$_ : match\n"; } else { print "$_ : fail\n"; } }