in reply to comparing folders

I think you want to test with "$file eq "@onefile" whether $file is contained in the array @onefile.

This is the wrong syntax.

What I would do is using a hash:

my %onefile= map { $_ => 1 } readdir(TMP); # Now every file in TMP is a key in the hash ... # and later we check like this: foreach $file (@allfiles) { if ($onefile{$file}) ...

Replies are listed 'Best First'.
Re^2: comparing folders
by grmshw4 (Initiate) on Jul 28, 2010 at 20:27 UTC
    That's exactly what I was trying to do. Thanks for the syntax help morgon!