print $q->scrolling_list('htapes99',[@H99tapes],[$H99tapes[0]],10,-multiple=>'true',my %attributes); #### my $tape_count = scalar @tape_imports; foreach (@tape_imports) { splice (@H99tapes,0,$tape_count,@H99tapes) } #### my @H99tapes =('H02043' .. 'H02999'); #...form stuff here my @tape_imports = $q->param(htapes99); #clean out all the values in @tape_imports from @H99tapes @H99tapes = do{ my @a = @H99tapes; #make a local copy of our list #now @a gets fed element by element into our map block #and its value is assigned to $_ map { #local copy of incoming value for map. We do this #because grep also assigns its values to $_ so #in order to not confuse things we assign it to a #locally scoped var $v my $v = $_; #check if this value is in the forbidden #list @tape_imports or not. We anchor the #regexp to avoid partial matches from other #values like '90' matching against '1905'. (!grep /^$v$/, @tape_imports) ? $v : (); } @a; };