in reply to Re^2: warnings and grep problem
in thread warnings and grep problem

You assigned the output of the map to a scalar $has so you'll just get the number of elements map returned, not the actual elements. Then you did keys %hash which is a whole new variable. The following might do what you want, but if you are messing with path/file names then i would highly recommend use a CPAN module.

my @dirs = map { s/\Q$dir\E(\w+?)\.pm$/$1/ } keys %$packlist; for (@dirs) { print $_, "\n"; }

___________
Eric Hodges