of course you should also use strict!!#!/usr/bin/perl use strict; my $check; my @text = ("Hi there 11", "Fred blamed me", "17 o clock", "It's snowi +ng hampsters", "Pickles are people too!"); foreach (@text) { if ( /11/ || /are/) { print "test successful"; $check++; } } unless ($check) { print "test failed"; }
In reply to Re: Re: Re: Matching arrays?
by jonnyfolk
in thread Matching arrays?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |