in reply to Re: automating linux commands in perl
in thread automating linux commands in perl

I think what you meant to suggest was:
@fils = grep { -f "$dirname/$_" } readdir DIR;
(I suspect that the value of $dirname does not end in a slash, so just concatenating it with the file name would be wrong.)