in reply to Re: Search List
in thread Search List

One subtle difference between your use of readdir and the OP's use of ls is that the latter will not list dot-files (e.g., .profile) by default. Conveniently, glob('*') mimics that behavior and shortens the necessary code:
my %searchlist = map {$_ => 1} glob('*');

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^3: Search List
by ikegami (Patriarch) on Dec 20, 2005 at 17:51 UTC

    Aye. The non-glob alternative would be to change
    grep { /^\.\.?$/ }
    to
    grep { /^\./ }