in reply to Need a replacement method for older version of perl

Hash look-ups will probably speed things up:
use warnings; use strict; my @taxR = ("PLRV1", "PMTVS", "PVXHB"); my %taxRh = map { $_ => 1 } @taxR; my $curEntry = "PMTVS"; if (exists $taxRh{$curEntry}) { print "do rest of stuff"; }

Replies are listed 'Best First'.
Re^2: Need a replacement method for older version of perl
by vivomancer (Initiate) on Jun 26, 2012 at 23:25 UTC
    Thanks, that's much more logical that what I was doing. Though it turns out that wasn't what was causing my program to break. I'm going to make a new thread since its going to be different enough from my topic title