sorry, now I am spamming :) perl -e '$tring="spam"."ringtones"."text"; if ( $tring =~ m/qwerty/ ){print "spam\n"}' perl -e '$tring="spam"."ringtones"."text"; if ( $tring =~ m/spam|ringtones|etc/ ){print "spam\n"}' spam
On 10/10/06, Eric Waguespack <[EMAIL PROTECTED]> wrote:
there is also grep.... perl -e '@rray = ("this", "is", "a", "test", "spam"); print (grep /bad|yuk|ugly|spam/, @rray)' On 10/10/06, Charles Farinella <[EMAIL PROTECTED]> wrote: > Tom Phoenix wrote: > > > It's hard to say for sure why it's not working, without seeing what > > you're trying to do. But maybe you want to use the 'last' operator to > > exit the foreach once you find a match? 'last' is documented in the > > perlfunc manpage. > > I believe that's just what I'm looking for, thanks so much. :-) > > > > Hope this helps! > > > > --Tom Phoenix > > Stonehenge Perl Training > > > > > -- > ------------------------------------------------------------------------ > Charles Farinella > Appropriate Solutions, Inc. (www.AppropriateSolutions.com) > [EMAIL PROTECTED] > voice: 603.924.6079 fax: 603.924.8668 > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > >
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>