in reply to Re: Re: Matching arrays?
in thread Matching arrays?
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"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Matching arrays?
by matija (Priest) on Mar 06, 2004 at 14:21 UTC |