in reply to selcting a specific file

My experience is that all the -X file operators work on Windows and FreeBSD. You could try

@files = grep { -s and -f} @files;
I would make sure that it's actually a file; directories on *ix-ish systems have non-zero size. It would probably also make sense to check to see if you have the required permissions for copying the file into another location, e.g. on *ix, you need write access in the target directory.

Copying files can be done with File::Copy or system,


...kudos to blazar for his observation about _ and the -X operators.


emc

Information about American English usage here and here.

Any Northeastern US area jobs? I'm currently unemployed.

Replies are listed 'Best First'.
Re^2: selcting a specific file
by blazar (Canon) on Oct 24, 2007 at 14:35 UTC
    @files = grep { -s and -f} @files;

    I personally believe that this is fine, but to avoid a double stat one would better

    @files = grep { -s and -f _} @files;

    Of course it would be nice to also have chained -X's, and IIRC 5.10 has them.