You heard the perl motto, haven't you -- "there's more than one way to do it" (or some such). Here's what I often use: @in = ('one', 'two_server', 'three'); @out = grep($_ !~ /server$/, @in); print join(',', @out) . "\n"; Basically, the 'grep' command takes each element of the second argument (@in) and assigns it to $_ and then evaluates the first argument (any perl expression) and assembles a list of the elements when the expression evaluates to true. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads