#! perl -slw use strict; my @text = ( "Hi there 11", "Fred blamed me", "17 o clock", "It's snowing hampsters", "Pickles are people too!" ); if ( grep( /11/, @text ) || grep( /are/, @text ) ) { print "test successfull"; } else { print "We messed something up again"; }; __END__ P:\test>334482 test successfull #### if ( grep( /11/ || /are/, @text ) ) { print "test successfull"; } else { print "We messed something up again"; }; #### if ( grep( /(11|are)/, @text ) ) { print "test successfull"; } else { print "We messed something up again"; };