Re: Testing an array for a match

2008-04-10 Thread John W. Krahn
Lou Hernsen wrote: Hallo Hello, I have an array @Treasures and I want to match anywhere in it for /:1:2:3:/ can I if (@Treasures =~ /:1:2:3:/){} or do i have to change (@Treasures to $Treasures and then $Treasures = @Treasures ; if ($Treasures =~ /:1:2:3:/){} if ( grep /:1:2:3:/, @Treasures

Testing an array for a match

2008-04-09 Thread Lou Hernsen
Hallo I have an array @Treasures and I want to match anywhere in it for /:1:2:3:/ can I if (@Treasures =~ /:1:2:3:/){} or do i have to change (@Treasures to $Treasures and then $Treasures = @Treasures ; if ($Treasures =~ /:1:2:3:/){} Just thought I'd ask first, I have to take mother in law to Dr.