Nikola Janceski wrote at Mon, 15 Jul 2002 21:16:09 +0200: > (better question) is there a better way to achieve the same result? > >> my @crap = map{ s/\.\w+$//; $_ } map { glob($_) } qw(*.pl *.pgp);
It seems you want to get the basenames of the files. Express what you want in a natural way: use File::Basename; my @suffixes = qw/.pl .pgp/; my @crap = map {basename $_, @suffixes} map {glob "*$_"} @suffixes; print join "\n", @crap; Greetings, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]