#!usr/bin/perl -w use warnings; my @list = ("a1", "b23", "c45", "d1", "b43", "b65"); print join (" ",@list),"\n"; #prints: a1 b23 c45 d1 b43 b65 @list = grep{!/^b/}@list; #remove things that start with b print join (" ",@list),"\n"; #prints: a1 c45 d1