in reply to Re^2: cant open files from a directory
in thread cant open files from a directory

I'd hardly consider one grep and one map to be "excessive grepping & mapping" nor something that one would need to "combat".

However, should you prefer the style you've posted, "-f $_" suffers from the problem already pointed out four times in this thread.

You could employ excessive usage of "$dir/$_", though. :-)

-- Ken

Replies are listed 'Best First'.
Re^4: cant open files from a directory
by Anonymous Monk on Feb 01, 2014 at 07:56 UTC

    Blocks of grep & map were simple enough, which could have been combined simply, notwithstanding my lack of attention to ...

    Thanks for pointing out the bug the fifth time that I had missed in my zeal to curb the extravagance.

    I would rather have then map { $f = "$dir/$_" ; -f $f ? ... } ..., though some may find "$f" to be excessive. (By this time I would have busted out File::Find already to be honest.)